find files

General questions about using WildEdit

Moderators: AmigoJack, bbadmin, helios, Bob Hansen, MudGuard

Post Reply
skwareks
Posts: 15
Joined: Wed Mar 02, 2005 6:36 pm
Location: Toronto

find files

Post by skwareks »

Hi Guys,

Need some help from WildEdit pros:-)

I need to find all files containing:

<integer name="MaxChars">5</integer>


the trick is I need to find files where the max char is 5 or greater. Does anyone know what I should put in instead of 5 so all files with <5 are not found?

Thanks,
Sebastian
User avatar
s_reynisson
Posts: 939
Joined: Tue May 06, 2003 1:59 pm

Post by s_reynisson »

Try something like [5-9]|[0-9][0-9]+
HTH
Then I open up and see
the person fumbling here is me
a different way to be
ben_josephs
Posts: 2461
Joined: Sun Mar 02, 2003 9:22 pm

Post by ben_josephs »

Don't forget the parentheses to stop the '|' grabbing too much:
([5-9]|[0-9][0-9]+)

Alternatively:
([5-9]|[0-9]{2,})
skwareks
Posts: 15
Joined: Wed Mar 02, 2005 6:36 pm
Location: Toronto

Post by skwareks »

first I was getting over 500 replacements in 3 test files where there should be not more than 15.

then I used

<integer name="MaxChars">([5-9]|[0-9]{2,})</integer>

and I got correct count.

Can you please tell me what should I change if next I want to find files with MaxChar =>85

I don't undertand what these numbers represent:

([5-9]|[0-9]{2,})

Thanks!!
User avatar
s_reynisson
Posts: 939
Joined: Tue May 06, 2003 1:59 pm

Post by s_reynisson »

Using Ben's solution - ([5-9]|[0-9]{2,}) - you have
() - group the options together
[5-9] - a single character that can be 5, 6, 7, 8 or 9
| - or
[0-9]{2,} - any two or more digits

To grab 85 and up you can use
(8[5-9]|9[0-9]|[0-9]{3,})
() - group the options together
8
[5-9] - followed by a single digit in the 5-9 range
| - or
9
[0-9] - followed by a single digit in the 0-9 range
| - or
[0-9]{3,} - any three or more digits
Then I open up and see
the person fumbling here is me
a different way to be
skwareks
Posts: 15
Joined: Wed Mar 02, 2005 6:36 pm
Location: Toronto

Post by skwareks »

Great! Thank You very much!!!
Post Reply