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

Multi-line regular expressions. #4934

Merged
merged 2 commits into from
Nov 26, 2013
Merged

Conversation

gitfoxi
Copy link
Contributor

@gitfoxi gitfoxi commented Nov 26, 2013

Basically, this one-line pull request improves an already outstanding feature as documented in issue #4927. If I ever escape another " it will be too soon.

@@ -699,6 +699,27 @@ For example, the following regex has all three flags turned on:
julia> match(r"a+.*b+.*?d$"ism, "Goodbye,\nOh, angry,\nBad world\n")
RegexMatch("angry,\nBad world")

Sometimes you want use double-quotes in regular expressions. Escaping them can
Copy link
Member

Choose a reason for hiding this comment

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

I would shorten this to something like: "You can also use triple-quoted string literals for regular expression, which is convenient for embedding quotation marks and newlines" and then maybe give a single example.

StefanKarpinski added a commit that referenced this pull request Nov 26, 2013
Multi-line regular expressions.
@StefanKarpinski StefanKarpinski merged commit dc03d8c into JuliaLang:master Nov 26, 2013
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