For example, if I wanted to match text with multiple lines I could use the /s modifier in preg_match.
Or I could use a character class like [^!]+ instead of the .+. (assuming I didn’t have any exclamation points in my RegEx)
Problem is there might be an exclamation mark sometimes. Also, when I do this it is greedy and matches all the way to the end.
Sorry for the newbie question but I can’t test /s in http://regexpal.com/ and I really like its interface. Basically I want a character class that won’t be used in the text and one that isn’t greedy so it doesn’t try to go as far as it can.
Thanks!
What about using
That should explicitely allow newlines, too.