4 ms·
Thank you. Can you explain what "?x:" does? Searching for regular expressions syntax (another thing this doesn't do) is quite tricky.
by oneeyedpigeon 12y ago
Thank you. Can you explain what "?x:" does? Searching for regular expressions syntax (another thing this doesn't do) is quite tricky.
- joosters 12y agoIt's another way of specifying a regular expression modifier, normally given at the end of a regex. In this case, 'x' means "Extend your pattern's legibility by permitting whitespace and comments"
- pbhjpbhj 12y agohttp://regex101.com/ http://regex101.com/ tells me: >"x modifier: extended. Spaces and text after a # in the pattern are ignored" // The other explainers I had to hand failed and/or called it an error.
- squeaky-clean 12y agoIt depends on the flavor of regex being used. Try switching regex101 to JS or PY mode, and you'll see that the x modifier isn't supported.