Regex code to allow everything **but** line breaks -


im trying hard understand regex coding i'm not quite @ it. need regex code allow but line breaks , can't figure out. put in prompts errors in form.

any ideas?

use negated character class of "line feed" characters:

^[^\r\n]*$ 

although "line feed" \n, "carriage return" character \r included too. if that's problem, use ^[^\n]*$.


Comments

Popular posts from this blog

sql server - Cannot query correctly (MSSQL - PHP - JSON) -

php - trouble displaying mysqli database results in correct order -

C++ Linked List -