Thread overview | |||||
---|---|---|---|---|---|
|
February 16, 2011 regex escapes | ||||
---|---|---|---|---|
| ||||
Hello,
Which characters are to be escaped:
* inside [] classes
* outside such classes
?
Also, is there for D regexes a "free form" format (where whitespace can be used to present formats more legibly, but must be escaped as literals)?
Denis
--
_________________
vita es estrany
spir.wikidot.com
|
February 16, 2011 Re: regex escapes | ||||
---|---|---|---|---|
| ||||
Posted in reply to spir | On 2011-02-16 5:48, spir wrote:
> Hello,
>
> Which characters are to be escaped:
> * inside [] classes
> * outside such classes
> ?
>
> Also, is there for D regexes a "free form" format (where whitespace can
> be used to present formats more legibly, but must be escaped as literals)?
>
> Denis
This is a comment in a regular expression: (?#comment)
The text, "comment", can be replaced with anything including whitespace. The comment is terminated with ).
Oh, never mind. I just tested this. std.regex doesn't support regex comments, apparently. :(
|
February 16, 2011 Re: regex escapes | ||||
---|---|---|---|---|
| ||||
Posted in reply to spir | spir Wrote: > Hello, > > Which characters are to be escaped: > * inside [] classes > * outside such classes > ? > > Also, is there for D regexes a "free form" format (where whitespace can be used to present formats more legibly, but must be escaped as literals)? Though you are probably asking specifically about D: http://www.regular-expressions.info/charclass.html std.regex doesn't follow everything so testing usually must be done with D. There is no place to find what isn't supported by D. Filing bugs is of course a good choice. |
Copyright © 1999-2021 by the D Language Foundation