General questions about using TextPad
Moderators: AmigoJack, bbadmin, helios, Bob Hansen, MudGuard
-
ravilobo
- Posts: 18
- Joined: Fri Dec 14, 2007 8:45 pm
Post
by ravilobo »
Is it possible to have RegEx for a range? For e.g. how to write a RegEx that searches numbers falling between 50 and 75?
-
ben_josephs
- Posts: 2461
- Joined: Sun Mar 02, 2003 9:22 pm
Post
by ben_josephs »
In the general case, no. Regular expressions can't do arithmetic. But in your specific case it's not too hard:
\<([56][0-9]|7[0-5])\>
This assumes you are using Posix regular expression syntax:
Configure | Preferences | Editor
[X] Use POSIX regular expression syntax
-
ravilobo
- Posts: 18
- Joined: Fri Dec 14, 2007 8:45 pm
Post
by ravilobo »
Got your point. Thank you Ben.