-Regex lookaround not working

The behaviour described in the bug report is either by design, or would be far too complex/time-consuming to be changed

Moderators: Hacker, petermad, Stefan2, white

Post Reply
Vankog
Junior Member
Junior Member
Posts: 5
Joined: 2013-09-13, 01:24 UTC
Location: Germany

-Regex lookaround not working

Post by *Vankog »

What do I want to do?
With the Win 7 Search I can utilise the following search term:

Code: Select all

(under:system\config\* OR under:system\tcm\*) -under:system\config\cartridges* -under:system\config\domains* -under:.svn\* -filename:.svn filename:*.* datemodified:>{DD.MM.YYYY}
{DD.MM.YYYY} is going to be replaced obviously:
Image: htt%20p%3A//img849.imageshack.%20us/img849/9546/za0f.png (cannot post images... so you have to fix the address)

The Problem
This search term is impossible to migrate to Total Commander (since at least v. 8.01 x64 up to v. 8.50b3).

The first problem I encountered is listed in another bug. Search bug with combined search criteria -> htt p://ghisler. ch/board/viewtopic.php?p=270482[/u rl] (cannot post links... so you have to fix the address)
This is the second approach to solve this by using only Regex.

However, for this to work I have to use lookarounds, i.e. lookahead or lookbehind.
I've tried all forms I know so far, but it seems the lookaround function does not work at all.
For example: Looking for files under \system\config\, but not \system\config\cartridges\:
Image: htt%20p%3A//img692.imageshack.%20us/img692/1609/hzp2.png (cannot post images... so you have to fix the address)
Image: htt%20p%3A//img829.imageshack.%20us/img829/3701/rrax.png (cannot post images... so you have to fix the address)

(Hm... jetz bekomm ich erst mit, dass ich hätte Deutsch schreiben können.)
User avatar
white
Power Member
Power Member
Posts: 5810
Joined: 2003-11-19, 08:16 UTC
Location: Netherlands

Re: Regex lookaround not working

Post by *white »

Vankog wrote:What do I want to do?
With the Win 7 Search I can utilise the following search term:

Code: Select all

(under:system\config\* OR under:system\tcm\*) -under:system\config\cartridges* -under:system\config\domains* -under:.svn\* -filename:.svn filename:*.* datemodified:>{DD.MM.YYYY}
{DD.MM.YYYY} is going to be replaced obviously:
Image: http://img849.imageshack.us/img849/9546/za0f.png (cannot post images... so you have to fix the address)

The Problem
This search term is impossible to migrate to Total Commander (since at least v. 8.01 x64 up to v. 8.50b3).

The first problem I encountered is listed in another bug. Search bug with combined search criteria -> http://ghisler.ch/board/viewtopic.php?p=270482 (cannot post links... so you have to fix the address)
This is the second approach to solve this by using only Regex.

However, for this to work I have to use lookarounds, i.e. lookahead or lookbehind.
I've tried all forms I know so far, but it seems the lookaround function does not work at all.
For example: Looking for files under \system\config\, but not \system\config\cartridges\:
Image: http://img692.imageshack.us/img692/1609/hzp2.png (cannot post images... so you have to fix the address)
Image: http://img829.imageshack.us/img829/3701/rrax.png (cannot post images... so you have to fix the address)

(Hm... jetz bekomm ich erst mit, dass ich hätte Deutsch schreiben können.)
Links fixed in quote above.

The implemented regular expression engine does not support look around expressions.
Vankog
Junior Member
Junior Member
Posts: 5
Joined: 2013-09-13, 01:24 UTC
Location: Germany

Post by *Vankog »

Oh, I see.
What a pitty.

Do you know any alternative powerfull search tools that do support lookaround and don't rely on indexing?
User avatar
white
Power Member
Power Member
Posts: 5810
Joined: 2003-11-19, 08:16 UTC
Location: Netherlands

Post by *white »

Vankog wrote:Oh, I see.
What a pitty.

Do you know any alternative powerfull search tools that do support lookaround and don't rely on indexing?
I didn't even know a world outside Total Commander existed ;-)

You are right, it is a pity. A better regular expression engine has been suggested before repeatedly. However Mr. Ghisler seems to be afraid of the amount of work it will be to implement it. Still hoping for the day though ;-)
fleggy
Junior Member
Junior Member
Posts: 97
Joined: 2011-10-20, 07:00 UTC

Post by *fleggy »

IDM (UltraEdit company - maybe you know them) migrated their regex engine to Boost C++ Library and I must say that this engine is far far better than the previous one. I'd like to see this engine in TC but Christian said no change is currently planned.
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 50541
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) »

Sorry, this type of search isn't currently supported.
Author of Total Commander
https://www.ghisler.com
Post Reply