Jump to content

Archived

This topic is now archived and is closed to further replies.

lead2gold

ereg() issues with <textarea>

Recommended Posts

I'm trying to parse a <textarea name='textarea'></textarea> after a submit. Everything parses fine until someone creates a new line (presses enter)

[code]
if (!ereg('^[0-9A-Za-z\r\n\t<>&()\/\'\" ]+$', $POST['textarea'])){
  echo "error";
}
[/code]

I thought \r and(/or) \n are the commands that are created a new line, but it appears it is something else. The regular expression defined above won't pick it up.
What am i overlooking/doing wrong?

Share this post


Link to post
Share on other sites

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.