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
Re: regex escapes
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. :(
Re: regex escapes
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.