Regular expression --> multiple line?

  • Thread starter Thread starter Arjen
  • Start date Start date
A

Arjen

Hi,

If the users enters some data it must be have 1 ... 100 characters. These
characters may be placed on multiple lines. (textbox)

I use this: .{1,100}
But this only works with one line.

What do I have to change in this: .{1,100}

Thanks!
 
Hi,

If the users enters some data it must be have 1 ... 100
characters. These characters may be placed on multiple lines.
(textbox)

I use this: .{1,100}
But this only works with one line.

What do I have to change in this: .{1,100}

Arjen,

Use the single line option in the regex:

(?s).{1,100}

This will treat multiple lines as one single line.
 
Back
Top