View Single Post
Old 12-12-2008, 09:02 PM   #20
=X=
Wizard
=X= ought to be getting tired of karma fortunes by now.=X= ought to be getting tired of karma fortunes by now.=X= ought to be getting tired of karma fortunes by now.=X= ought to be getting tired of karma fortunes by now.=X= ought to be getting tired of karma fortunes by now.=X= ought to be getting tired of karma fortunes by now.=X= ought to be getting tired of karma fortunes by now.=X= ought to be getting tired of karma fortunes by now.=X= ought to be getting tired of karma fortunes by now.=X= ought to be getting tired of karma fortunes by now.=X= ought to be getting tired of karma fortunes by now.
 
=X='s Avatar
 
Posts: 3,671
Karma: 12205348
Join Date: Mar 2008
Device: Galaxy S, Nook w/CM7
Quote:
Originally Posted by daesdaemar View Post
It works fabulously! May I trouble you to explain exactly how the expresion "[0-9]{1,5} John Smith" actually works?

Thank you very much.
Sure
[0-9] Means look for any digit from 0-9. For upper case letters A-Z
{1,5} Uses the match condition to the left of it and looks. Looks for any occurrence from a single digit 1 up to 5 digits. In your case it looks for 0-9, so it will look for (e.g 0-99999). If we had a page count 100,000 it would not find it. You can change these values. If you want exact digits do {1}.

" " = space. With real regular expression you use "\s" with MS you must use a space.
"John Smith" looks for that exact expression.
=X= is offline   Reply With Quote