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.
How to search for "Info [##].ext"?
-
admin
- Site Admin
- Posts: 65185
- Joined: 22 May 2004 16:48
- Location: Win8.1, Win10, Win11, all @100%
- Contact:
Re: How to search for "Info [##].ext"?
I think this way: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.
Info [[]##[]].ext
IOW: the [ and ] characters must be enclosed in [ and ]. Crazy...
FAQ | XY News RSS | XY X
-
Gandolf
-
admin
- Site Admin
- Posts: 65185
- Joined: 22 May 2004 16:48
- Location: Win8.1, Win10, Win11, all @100%
- Contact:
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...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.
BTW: just found out that only the left one needs the crazy treatment. So this works too:
Info [[]##].ext
FAQ | XY News RSS | XY X
-
Gandolf
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 """.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...![]()
-
Gandolf
XYplorer Beta Club