View Single Post
Old 09-05-2011, 04:25 AM   #7
pdurrant
The Grand Mouse 高貴的老鼠
pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.
 
pdurrant's Avatar
 
Posts: 74,082
Karma: 315558332
Join Date: Jul 2007
Location: Norfolk, England
Device: Kindle Oasis
Quote:
Originally Posted by organized_chaos View Post
_([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.
pdurrant is offline   Reply With Quote