Regular expressions for filename searches & file sorting

Discussion & Support for xplorer² professional

Moderators: fgagnon, nikos, Site Mods

Kilmatead
Platinum Member
Platinum Member
Posts: 4623
Joined: 2008 Sep 30, 06:52
Location: Dublin

Post by Kilmatead »

nikos wrote:i was never a fan of non-deterministic finite state machines either
Actually those things just make me giggle like a delusional child and curl up into a small ball of fear regarding the outside world and the possibility of intelligent life actually existing on this crazy planet in the first place.  Thus causing some of my more eremetically creative moments, ironically enough. :D

And upon further reflection, I misread FrizzleFry's example: [1-35] is 1 to 3 and 5, not the logically obvious 1-35.  Sorry about that - I'm blind as well as full of fuzzy logic (plus it was only 8 am when I read that first, so it takes a few hours for the hair-of-the-dog to kick in properly and make the world a better place). :wink:
User avatar
nikos
Site Admin
Site Admin
Posts: 15884
Joined: 2002 Feb 07, 15:57
Location: UK
Contact:

Post by nikos »

i need a regular expression to match exactly 8 hex digits

[0-9a-fA-F]*

is not it!

but this is it:

[0-9a-fA-F]{8}

case closed :)
User avatar
Thracx
Silver Member
Silver Member
Posts: 263
Joined: 2004 Nov 05, 19:33
Contact:

Post by Thracx »

nikos wrote:[0-9a-fA-F]{8}
goooooooo nikos!  Seeing you use RegExps brings a tear to my eye :party:
-Thracx

"Man wants to know, and when he ceases to do so, he is no longer a man."
-Fridtjof Nansen
User avatar
nikos
Site Admin
Site Admin
Posts: 15884
Joined: 2002 Feb 07, 15:57
Location: UK
Contact:

Post by nikos »

if we had capability of regexp file (mass) renaming, would we need the existing $-tokens or things would be enough with the regexp syntax?
narayan
Platinum Member
Platinum Member
Posts: 1430
Joined: 2002 Jun 04, 07:01

Post by narayan »

tokens are still needed for the non-technical people...
User avatar
nikos
Site Admin
Site Admin
Posts: 15884
Joined: 2002 Feb 07, 15:57
Location: UK
Contact:

Post by nikos »

tokens won't go away but the question is whether they are needed within regular expressions or not
User avatar
FrizzleFry
Platinum Member
Platinum Member
Posts: 1246
Joined: 2005 Oct 16, 19:09

Post by FrizzleFry »

REs would take care of search & replace type mass renaming but you still need the tokens for the type of mass renaming we have now... counters, quickly adding suffixes or prefixes. Search & replace also needs two terms or fields... what to search for (the RE) and what to replace it with.
narayan
Platinum Member
Platinum Member
Posts: 1430
Joined: 2002 Jun 04, 07:01

Post by narayan »

Token or not, the RegEx should be able to manipulate the following:

1. File properties (e.g. value of any column; including path, extension, basename, etc).
2. Item's position in the active/inactive pane
Post Reply