Problem with RegExp
dennis luehring
dl.soluz at gmx.net
Wed Jan 2 11:53:42 PST 2008
> void main (char [][] args) {
> string text = "Why doesn't it find the sssss's?";
>
> RegExp pattern = new RegExp(r"[^\s]+");
> //Notice the escape code in the expression.
>
> RegExp list = pattern.search(text);
>
> foreach(m; list) {
> writefln(m.match(0));
> }
>
> }
i think its a bug
\s machtes invisible chars AND the char s
[^\s] seem to be interpreted like [^s\s]
More information about the Digitalmars-d
mailing list