beta 3201.10

Discussion & Support for xplorer² professional

Moderators: fgagnon, nikos, Site Mods

User avatar
nikos
Site Admin
Site Admin
Posts: 16402
Joined: 2002 Feb 07, 15:57
Location: UK

beta 3201.10

Post by nikos »

Kilmatead
Platinum Member
Platinum Member
Posts: 4879
Joined: 2008 Sep 30, 06:52
Location: Baile Átha Cliath

Re: beta 3201.10

Post by Kilmatead »

For those interested in the changes from the last beta, attached is a most meticulous changelog comparison.

It shows, if nothing else, that Nikos still just doesn't get it when it comes to ergonomics. :D But he tries. I guess. Maybe one day he'll figure it out.
Kilmatead
Platinum Member
Platinum Member
Posts: 4879
Joined: 2008 Sep 30, 06:52
Location: Baile Átha Cliath

Re: beta 3201.10

Post by Kilmatead »

And just to clarify, when he says "try drag-dropping a file in the filter part of the find dialog and see what happens" he means the 'Named' field, not the look-in field.
Kilmatead
Platinum Member
Platinum Member
Posts: 4879
Joined: 2008 Sep 30, 06:52
Location: Baile Átha Cliath

Re: beta 3201.10

Post by Kilmatead »

don't use any upper case letters in regular expressions except for such special switches. Otherwise you won't find your filenames
This is nuts, as even typing explicitly upper-case filename characters don't match even existing explicit-upper-case characters in filenames.

Why didn't you just (invisibly) hardcode the prefix (?i) to the string before it's compiled by DEELX? That way any upper-case characters typed by the user (even accidentally!) will at least register properly and find the filenames, with the user none-the-wiser for the modification.

We're supposed to be making RegEx easier, not weirder! :roll:
User avatar
nikos
Site Admin
Site Admin
Posts: 16402
Joined: 2002 Feb 07, 15:57
Location: UK

Re: beta 3201.10

Post by nikos »

from gazillion years ago all filenames are case insensitive so x2 converts them to lowercase for comparisons
there's no need to change that because you discovered after 10 years of use that once every 10 years you may use an uppercase switch to regexp, no?
Kilmatead
Platinum Member
Platinum Member
Posts: 4879
Joined: 2008 Sep 30, 06:52
Location: Baile Átha Cliath

Re: beta 3201.10

Post by Kilmatead »

No, you misunderstand, this is not about me, this is about John Doe user. While RegEx syntax is case-sensitive, I know that NTFS is not, and nor am I suggesting you change that.

What I am saying, is that should I have a file named "Eircom1.txt" (with a capital E), if I use RegEx to search for it using (literally):

Eircom\d (note the capital-E)

...it will not be found by x2 even though it literally matches. However, if I use

eircom\d (lowercase-E)

...that works.

So, to make myself idiot/accident-proof I have to use

(?i)Eircom\d

as a RegEx filter... every single time adding the "(?i)" text myself just in case, as that will find the file no matter what case I enter the name with since all text comparisons automatically become case-neutral.

Thus: if you concatenate the (?i) to the string (as prefix) yourself before you give it to DEELX's regexp.Match() to munch on,

wchar_t ptn[] = L"(?i)Eircom\\d";
CRegexpT <wchar_t> regexp(ptn);

...the case-ness of the 'E' becomes irrelevant and the file will always be found no matter what case the user types in.

Is this so hard to understand?

PERL-friendly Regular expressions must be processed case-sensitive, but the secondary text-comparisons themselves do not have to be.

DEELX seems have an IGNORECASE flag built in so maybe that makes it simpler...

Code: Select all

// REGEX_FLAGS
#ifndef _REGEX_FLAGS_DEFINED
	enum REGEX_FLAGS
	{
		NO_FLAG        = 0,
		SINGLELINE     = 0x01,
		MULTILINE      = 0x02,
		GLOBAL         = 0x04,
		IGNORECASE     = 0x08,
		RIGHTTOLEFT    = 0x10,
		EXTENDED       = 0x20
	};
	#define _REGEX_FLAGS_DEFINED
#endif
Yeah, there's your monkey:

CRegexpT <wchar_t> regexp(ptn, IGNORECASE);

:D
Tuxman
Platinum Member
Platinum Member
Posts: 1711
Joined: 2009 Aug 19, 07:49

Re: beta 3201.10

Post by Tuxman »

Kilmatead wrote:While RegEx syntax is case-sensitive, I know that NTFS is not
Except that it is.
Kilmatead
Platinum Member
Platinum Member
Posts: 4879
Joined: 2008 Sep 30, 06:52
Location: Baile Átha Cliath

Re: beta 3201.10

Post by Kilmatead »

Ok, true, I was speaking practically from one particular (the most common) point of view. While there is a (more or less) true case-sensitivity available, most of us live in the case-preservative world...
POSIX takes advantage of the full case sensitive mode, while MS-DOS, WOW, and Win32 subsystems use the case insensitive mode.
And if the whole of Win32 is based upon a delimited paradigm, it's probably not likely to fundamentally change any time soon. :shrug:
Tuxman
Platinum Member
Platinum Member
Posts: 1711
Joined: 2009 Aug 19, 07:49

Re: beta 3201.10

Post by Tuxman »

Kilmatead wrote:most of us live in the case-preservative world...
That might be the most practical way to live. But when have you started to do the most practical thing?
Kilmatead
Platinum Member
Platinum Member
Posts: 4879
Joined: 2008 Sep 30, 06:52
Location: Baile Átha Cliath

Re: beta 3201.10

Post by Kilmatead »

Us humble muleteers must choose our battles wisely, dear Sancho, and only tilt at the windmills that may actually succumb to our whims - many the challenges are, yet so rare the victories be. :D
Tuxman
Platinum Member
Platinum Member
Posts: 1711
Joined: 2009 Aug 19, 07:49

Re: beta 3201.10

Post by Tuxman »

Have you ever considered to learn some programming so you can just change the windmills?
Kilmatead
Platinum Member
Platinum Member
Posts: 4879
Joined: 2008 Sep 30, 06:52
Location: Baile Átha Cliath

Re: beta 3201.10

Post by Kilmatead »

And what, reinvent the wheel? Correct the perceived injustices for the huddled masses? If you're going to quietly trumpet the Punk ideology, you can't do this to win, man, you gotta do it to undermine the machine. Not so we can start over with a clean slate, but simply so we can taste the dust and grit of what so many weirdos took so seriously for so long.

I am not here to change the windmills, I'm here to diligently polish their windows, sand and saw their boards, grind their stones... for it seems so sad to me that so few can even see them any more to appreciate what the tilting was all about in the first place! That all human endeavour ultimately comes to nought is the only lance the contemporary knight-errant needs. :D
George Chapman wrote:Who to himself is law no law doth need, offends no law, and is a king indeed.
Tuxman
Platinum Member
Platinum Member
Posts: 1711
Joined: 2009 Aug 19, 07:49

Re: beta 3201.10

Post by Tuxman »

Undermining a machine which doesn't know nor care who you are and what you do doesn't seem too logical. Remember that it keeps you alive, after all.
dunno
Gold Member
Gold Member
Posts: 541
Joined: 2007 Nov 18, 03:00
Location: Tropical Hammock

Re: beta 3201.10

Post by dunno »

I always type in the first letter capitalised when searching for one of my files, are you saying that my searches will only return if I use small caps ?...I've just learnt something.
Kilmatead
Platinum Member
Platinum Member
Posts: 4879
Joined: 2008 Sep 30, 06:52
Location: Baile Átha Cliath

Re: beta 3201.10

Post by Kilmatead »

No, this only applies to searches using regular expressions (Fuzzy == 0) in the current beta - non-RegEx searching behaves as normal. This, with some luck (and a lot of common sense), should be fixed before release.

If you are using RegEx in searching then... yeah, don't type any capital letters for the time being.