Hi all,
I am trying to determine how many newlines exist in a string -
For example:
"Hi, my name is Mustafa\n, I am eating peanuts and drinking coffee.\n This coffee tastes like crap\n".
One suggestion by a php developer was, regexp out everything but newlines and then do a strlen($new_string); - unfortunately, I am not very good at regexps - any help would be appreciated. (regexp or another idea)
P.S: The reason here is controlling height of pages for printable media - and newlines have to be accounted for by 'x' number of chars - depending on template width.
Thx all,
-m.