Page 1 of 1
How to search for "Info [##].ext"?
Posted: 17 Nov 2007 12:03
by Gandolf
I need to search for files of the form "Info [##].ext" (## is one or more digits).
RegExp "Info \[.*\]\..*" works but I cannot get a standard expression to work - "Info \[*\].*" doesn't. It doesn't seem to escape the "[" or"]".
Any ideas??
I'm quite happy to use the RegExp's since I prefer them but curious if it can be done with a standard expression.
Re: How to search for "Info [##].ext"?
Posted: 17 Nov 2007 12:30
by admin
Gandolf wrote:I need to search for files of the form "Info [##].ext" (## is one or more digits).
RegExp "Info \[.*\]\..*" works but I cannot get a standard expression to work - "Info \[*\].*" doesn't. It doesn't seem to escape the "[" or"]".
Any ideas??
I'm quite happy to use the RegExp's since I prefer them but curious if it can be done with a standard expression.
I think this way:
Info [[]##[]].ext
IOW: the [ and ] characters must be enclosed in [ and ]. Crazy...

Posted: 17 Nov 2007 12:54
by Gandolf
Crazy indeed, but it works. I wonder why the "\" doesn't escape them since it escapes the "!". I think I'll stick to RegExp - I understand them.
Posted: 17 Nov 2007 12:58
by admin
Gandolf wrote:Crazy indeed, but it works. I wonder why the "" doesn't escape them since it escapes the "!". I think I'll stick to RegExp - I understand them.
It's not my rules. The patterns are interpreted by some native function. Of course I could be so nice to convert \[ into [[]... good idea...
BTW: just found out that only the left one needs the crazy treatment. So this works too:
Info [[]##].ext
Posted: 18 Nov 2007 07:40
by Gandolf
admin wrote:It's not my rules. The patterns are interpreted by some native function. Of course I could be so nice to convert \[ into [[]... good idea...

I think if that is the rule then stick to it, other users may know that is how it works. A mention of it in the find files section of the (dreaded) help file might be useful; since you mention "If you want to find items starting with "!" you have to escape it with """.
Posted: 19 Nov 2007 06:31
by Gandolf
admin wrote:...Of course I could be so nice to convert \[ into [[]... good idea...

...
Thanks for adding that, it gives me plenty of options now.