Title: re.sub() replaces only several matches · Issue #56287 · python/cpython · GitHub
Open Graph Title: re.sub() replaces only several matches · Issue #56287 · python/cpython
X Title: re.sub() replaces only several matches · Issue #56287 · python/cpython
Description: BPO 12078 Nosy @ezio-melotti Superseder bpo-11957: re.sub confusion between count and flags args Files repl.sh: sed replace which worksrepl.py: Python replace which does not worktest.txt: Text to replace Note: these values reflect the st...
Open Graph Description: BPO 12078 Nosy @ezio-melotti Superseder bpo-11957: re.sub confusion between count and flags args Files repl.sh: sed replace which worksrepl.py: Python replace which does not worktest.txt: Text to r...
X Description: BPO 12078 Nosy @ezio-melotti Superseder bpo-11957: re.sub confusion between count and flags args Files repl.sh: sed replace which worksrepl.py: Python replace which does not worktest.txt: Text to r...
Opengraph URL: https://github.com/python/cpython/issues/56287
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"re.sub() replaces only several matches","articleBody":"BPO | [12078](https://bugs.python.org/issue12078)\n--- | :---\nNosy | @ezio-melotti\nSuperseder | \u003cli\u003ebpo-11957: re.sub confusion between count and flags args\u003c/li\u003e\nFiles | \u003cli\u003e[repl.sh](https://bugs.python.org/file21999/repl.sh \"Uploaded as application/x-shellscript at 2011-05-14.15:04:53 by arysin\"): sed replace which works\u003c/li\u003e\u003cli\u003e[repl.py](https://bugs.python.org/file22000/repl.py \"Uploaded as text/plain at 2011-05-14.15:05:26 by arysin\"): Python replace which does not work\u003c/li\u003e\u003cli\u003e[test.txt](https://bugs.python.org/file22001/test.txt \"Uploaded as text/plain at 2011-05-14.15:05:40 by arysin\"): Text to replace\u003c/li\u003e\n\n\u003csup\u003e*Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.*\u003c/sup\u003e\n\n\u003cdetails\u003e\u003csummary\u003eShow more details\u003c/summary\u003e\u003cp\u003e\n\nGitHub fields:\n```python\nassignee = None\nclosed_at = \u003cDate 2011-05-14.21:49:39.374\u003e\ncreated_at = \u003cDate 2011-05-14.15:04:53.100\u003e\nlabels = ['expert-regex']\ntitle = 're.sub() replaces only several matches'\nupdated_at = \u003cDate 2011-05-14.22:13:00.721\u003e\nuser = 'https://bugs.python.org/arysin'\n```\n\nbugs.python.org fields:\n```python\nactivity = \u003cDate 2011-05-14.22:13:00.721\u003e\nactor = 'arysin'\nassignee = 'none'\nclosed = True\nclosed_date = \u003cDate 2011-05-14.21:49:39.374\u003e\ncloser = 'ezio.melotti'\ncomponents = ['Regular Expressions']\ncreation = \u003cDate 2011-05-14.15:04:53.100\u003e\ncreator = 'arysin'\ndependencies = []\nfiles = ['21999', '22000', '22001']\nhgrepos = []\nissue_num = 12078\nkeywords = []\nmessage_count = 4.0\nmessages = ['135975', '135980', '135992', '135995']\nnosy_count = 3.0\nnosy_names = ['ezio.melotti', 'mrabarnett', 'arysin']\npr_nums = []\npriority = 'normal'\nresolution = 'duplicate'\nstage = 'resolved'\nstatus = 'closed'\nsuperseder = '11957'\ntype = None\nurl = 'https://bugs.python.org/issue12078'\nversions = ['Python 3.1']\n```\n\n\u003c/p\u003e\u003c/details\u003e\n","author":{"url":"https://github.com/arysin","@type":"Person","name":"arysin"},"datePublished":"2011-05-14T15:04:53.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":4},"url":"https://github.com/56287/cpython/issues/56287"}
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:90e8d9df-b393-a002-44ad-169c4f302593 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | 86F6:3F0C56:6D8FBF:9FEE07:6A4E1326 |
| html-safe-nonce | 46fdbeca5ad7e437a1b95f436a73ae46fdd4c05b29f8b5c1ae269448d0d52732 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI4NkY2OjNGMEM1Njo2RDhGQkY6OUZFRTA3OjZBNEUxMzI2IiwidmlzaXRvcl9pZCI6Ijg0OTgxMTc1MDg3NzkwODY2MzAiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | f044c78be2afb98436991450d1028a6359e2388348d65308d8378ab1e52b3a0b |
| hovercard-subject-tag | issue:1198869233 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/python/cpython/56287/issue_layout |
| twitter:image | https://opengraph.githubassets.com/94286e56ad26231aa5149d9062b8137ce9b8e4c821ff11c2f02d9ca20991dbe1/python/cpython/issues/56287 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/94286e56ad26231aa5149d9062b8137ce9b8e4c821ff11c2f02d9ca20991dbe1/python/cpython/issues/56287 |
| og:image:alt | BPO 12078 Nosy @ezio-melotti Superseder bpo-11957: re.sub confusion between count and flags args Files repl.sh: sed replace which worksrepl.py: Python replace which does not worktest.txt: Text to r... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | arysin |
| hostname | github.com |
| expected-hostname | github.com |
| None | 030096ee0db095447bfe77409d33bfac127ca7128299c58deef27c52eaa1b1f0 |
| turbo-cache-control | no-preview |
| go-import | github.com/python/cpython git https://github.com/python/cpython.git |
| octolytics-dimension-user_id | 1525981 |
| octolytics-dimension-user_login | python |
| octolytics-dimension-repository_id | 81598961 |
| octolytics-dimension-repository_nwo | python/cpython |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 81598961 |
| octolytics-dimension-repository_network_root_nwo | python/cpython |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | ea9187571e3edc5f2780f750631138669441ca50 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width