Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

replace with optional matching fails when there is no match (31456) #40391

Merged
merged 1 commit into from
Apr 9, 2021
Merged

replace with optional matching fails when there is no match (31456) #40391

merged 1 commit into from
Apr 9, 2021

Conversation

tlienart
Copy link
Contributor

@tlienart tlienart commented Apr 7, 2021

This is a resuscitation of #31493 (which I couldn't update easily). The context is #31456 , there's an error if an optional matching group is unset as can be seen in the contrived example below.

Before:

julia> replace("The quick fox run quickly.", r"fox(es)?" => s"bus\1")
ERROR: PCRE error: requested value is not set

After

julia> replace("The quick fox run quickly.", r"fox(es)?" => s"bus\1")
"The quick bus run quickly."

cc @vtjnash (it integrates the changes you suggested in #31493)

Copy link
Member

@vtjnash vtjnash left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I suppose we should leave this open for a couple days, for others to have a chance to comment, but lgtm

@vtjnash vtjnash added the forget me not PRs that one wants to make sure aren't forgotten label Apr 8, 2021
@vtjnash vtjnash merged commit bb608e5 into JuliaLang:master Apr 9, 2021
ElOceanografo pushed a commit to ElOceanografo/julia that referenced this pull request May 4, 2021
antoine-levitt pushed a commit to antoine-levitt/julia that referenced this pull request May 9, 2021
@simeonschaub simeonschaub removed the forget me not PRs that one wants to make sure aren't forgotten label May 29, 2021
johanmon pushed a commit to johanmon/julia that referenced this pull request Jul 5, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants