Skip to content

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

Closed
@matematikaadit

Description

@matematikaadit

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)

Activity

added a commit that references this issue on Feb 18, 2017
767f80f
added a commit that references this issue on Feb 18, 2017

Auto merge of #343 - BurntSushi:fixes, r=BurntSushi

7297f23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

      Development

      Participants

      @matematikaadit@BurntSushi

      Issue actions

        Mention how to escape whitespace in the insignificant whitespace mode `(?x)` · Issue #326 · rust-lang/regex