Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

allowing carriage return in regExp

Status
Not open for further replies.

ItHurtsWhenIThink

Technical User
Sep 1, 2007
60
US
I have the following expression, but need to allow carriage return. I have read several sites regarding this but can't seem to get a grip on how to do it. Can you please help?

Current expression:"^[a-zA-Z0-9.,_ \-\r]+$"

I need to add carriage return which is '\r' I just can't seem to be able to use it correctly.
 
To match over multiple lines you can add the /m modifier to the pattern.

And a 'newline' for documents created on Windows comprises of two characters, a carriage return (CR)ASCII 13 /r and a line feed (LF)ASCII 10 /n.




Chris.

Indifference will be the downfall of mankind, but who cares?
Time flies like an arrow, however, fruit flies like a banana.
Webmaster Forum
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top