Another Regular Expression question

  • Thread starter Thread starter Axel Dahmen
  • Start date Start date
A

Axel Dahmen

Hi,

I don't understand how the regular expression parser interprets the
MultiLine flag. Although I set it to true, my RegExp object doesn't find

/a.+n/

in

"ado-
net".

However, it finds the expression in "ado-net".

Can someone please enlighten me?

TIA,
Axel Dahmen
 
Perhaps you are looking for the SingleLine flag?

From the MSDN help:
Multiline: Multiline mode. Changes the meaning of ^ and $ so they match at
the beginning and end, respectively, of any line, and not just the beginning
and end of the entire string.
Singleline: Specifies single-line mode. Changes the meaning of the dot (.)
so it matches every character (instead of every character except\n).

Andrej
 
Back
Top