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

Mention how to escape whitespace in the insignificant whitespace mode (?x) #326

Closed
matematikaadit opened this issue Jan 7, 2017 · 0 comments · Fixed by #343
Closed

Mention how to escape whitespace in the insignificant whitespace mode (?x) #326

matematikaadit opened this issue Jan 7, 2017 · 0 comments · Fixed by #343
Labels

Comments

@matematikaadit
Copy link

In this section of the documentation, https://doc.rust-lang.org/regex/regex/index.html#example-replacement-with-named-capture-groups, it's mentioned that you can use x flag to enable insignificant whitespace mode. It might be good to also mention how you escape the whitespace, since it's probably also something that they wanna know.

For example, adding this line at the end might help:

If you wish to match against whitespace in this mode, you can use \s, \n, \t, etc. For escaping space, ' ', you can use it's hex character code \x20 or alternatively write it as (?-x: ).

Or something along those line.

(sorry, english isn't my native language)

@BurntSushi BurntSushi added doc and removed enhancement labels Feb 8, 2017
BurntSushi added a commit to BurntSushi/regex that referenced this issue Feb 18, 2017
@BurntSushi BurntSushi mentioned this issue Feb 18, 2017
bors added a commit that referenced this issue Feb 18, 2017
Fixes

This PR contains a series of commits that fixes several minor bugs.

Fixes #321, Fixes #334, Fixes #326, Fixes #333, Fixes #338
@bors bors closed this as completed in #343 Feb 18, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants