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.
 
Thanks!

Arjen




Chris R. Timmons said:
Arjen,

Use the single line option in the regex:

(?s).{1,100}

This will treat multiple lines as one single line.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top