Quote:
Originally Posted by organized_chaos
_([a-z ,.'"-;:]+?)_ worked perfectly for me. I didn't know I could just add additional things to that (like punctuation). If there were numbers in the book would I need to add something like 0-9?
_([a-z ,0-9.'"-;:]+?)_
|
Exactly so. the [] give a range of characters that can match. The + after the [] says that there can be as many matches as possible, but that it must match at least one character. I suppose, strictly speaking, the ? is unnecessary, since the match can't include underscores.