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)

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions