RegExp: Lookaround doesn't support? -- look ahead / look behind regular expressions don't work

English support forum

Moderators: sheep, Hacker, Stefan2, white

Post Reply
User avatar
Ovg
Power Member
Power Member
Posts: 647
Joined: 2014-01-06, 16:26 UTC
Location: MOW

RegExp: Lookaround doesn't support? -- look ahead / look behind regular expressions don't work

Post by *Ovg »

Hi all RegExp Guru! :-)

I got an error :

Code: Select all

Invalid file name specified! 
^((?!_h).)*$

TRegExprW(comp): Urecognized Modifier (pos 7)
What am I do wrong? This is a bug of feature? :D
https://yadi.sk/i/eco-pCGbAY7iAw

This RegExp working fine in UltraEdit

TC 9.21a x86/x64
Last edited by Ovg on 2018-10-31, 19:04 UTC, edited 3 times in total.
It's impossible to lead us astray for we don't care even to choose the way.
#259941, TC 9.51 x64, Windows 7 SP1 x64

User avatar
Horst.Epp
Power Member
Power Member
Posts: 3763
Joined: 2003-02-06, 17:36 UTC
Location: Germany

Re: Bug in regexp engine?

Post by *Horst.Epp »

Your link doesn't work.
So what are you doing in TC to get that error ?
Windows 10 Home x64 May 2020 Update, Version 2004 (OS Build 19041.331)
Intel(R) Core(TM) i7-4770 CPU @ 3.40GH, 16GB RAM
TC 9.51 x64 / x86, Everything 1.4.1.985 (x64)

User avatar
Ovg
Power Member
Power Member
Posts: 647
Joined: 2014-01-06, 16:26 UTC
Location: MOW

Re: Bug in regexp engine?

Post by *Ovg »

I'm trying to search for files using regexp
https://yadi.sk/i/eco-pCGbAY7iAw
It's impossible to lead us astray for we don't care even to choose the way.
#259941, TC 9.51 x64, Windows 7 SP1 x64


User avatar
Horst.Epp
Power Member
Power Member
Posts: 3763
Joined: 2003-02-06, 17:36 UTC
Location: Germany

Re: Bug in regexp engine?

Post by *Horst.Epp »

Ovg wrote:
2018-10-31, 17:34 UTC
I'm trying to search for files using regexp
https://yadi.sk/i/eco-pCGbAY7iAw
Lets see what RegEx experts or Christian say.
Works at least using Everything syntax.
Go to the starting dir and enter
ed:regex:^((?!_h).)*$
Last edited by Horst.Epp on 2018-10-31, 19:29 UTC, edited 2 times in total.
Windows 10 Home x64 May 2020 Update, Version 2004 (OS Build 19041.331)
Intel(R) Core(TM) i7-4770 CPU @ 3.40GH, 16GB RAM
TC 9.51 x64 / x86, Everything 1.4.1.985 (x64)

User avatar
Ovg
Power Member
Power Member
Posts: 647
Joined: 2014-01-06, 16:26 UTC
Location: MOW

Re: Bug in regexp engine?

Post by *Ovg »

It seems look ahead / behind doesn't support?
It's impossible to lead us astray for we don't care even to choose the way.
#259941, TC 9.51 x64, Windows 7 SP1 x64

User avatar
Stefan2
Power Member
Power Member
Posts: 2923
Joined: 2007-09-13, 22:20 UTC
Location: Europa

Re: Bug in regexp engine?

Post by *Stefan2 »

Ovg wrote:
2018-10-31, 18:41 UTC
It seems look ahead / behind doesn't support?
That's right, it's not supported by the RE-engine TC uses. For more info search the forum for 'lookaround'




 

User avatar
Ovg
Power Member
Power Member
Posts: 647
Joined: 2014-01-06, 16:26 UTC
Location: MOW

Re: Bug in regexp engine?

Post by *Ovg »

Ok. Thank you!
I will change topic name.
It's impossible to lead us astray for we don't care even to choose the way.
#259941, TC 9.51 x64, Windows 7 SP1 x64

User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 39734
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Re: Lookaround doesn't support?

Post by *ghisler(Author) »

Sorry, the used RegEx engine doesn't support it.
Author of Total Commander
http://www.ghisler.com

User avatar
Ovg
Power Member
Power Member
Posts: 647
Joined: 2014-01-06, 16:26 UTC
Location: MOW

Re: Lookaround doesn't support?

Post by *Ovg »

ghisler(Author)
Thank you for confirming this!
It's impossible to lead us astray for we don't care even to choose the way.
#259941, TC 9.51 x64, Windows 7 SP1 x64

alexblade
Junior Member
Junior Member
Posts: 19
Joined: 2012-02-07, 09:24 UTC
Contact:

Re: RegExp: Lookaround doesn't support? -- look ahead / look behind regular expressions don't work

Post by *alexblade »

HI guys
I have the same error

TRegExpr: Unrecognized modifier

as understand , this is because TC is using an old (not popular) TRegExp engine by Andrey V. Sorokin [ http://regexpstudio.com/ also is no more supported ]

may be Author can change regex engine to PCRE ? or may be you know how I can change it for Lister ?

and second question how I should edit my pattern to avoid error and have correct result ?

Code: Select all

:\/\/(?!.*www\.google)\S{6}
thank you

User avatar
tuska
Power Member
Power Member
Posts: 2002
Joined: 2007-05-21, 12:17 UTC

Re: RegExp: Lookaround doesn't support? -- look ahead / look behind regular expressions don't work

Post by *tuska »

Hi,
alexblade wrote:TRegExp engine by Andrey V. Sorokin [ http://regexpstudio.com/ also is no more supported ]
TRegExpr by Andrey V. Sorokin is supportet: https://regex.sorokin.engineer/

'Everything' uses 'Perl Compatible Regular Expressions (PCRE)' and can be used for search queries in TC (see my signature).
See also point 3. RegEx - Regular Expressions from "Search queries: TC <=> 'Everything'" (link in signature).

Regarding RegEx-code, I'm afraid I can't help you.


Windows 10 Pro (x64) Version 1909 (OS build 18363.836)
TC 9.51 x64/x86 | 'Everything'-Version 1.4.1.983 (x64)
☑ 'Everything' | Search queries: TC <=> 'Everything'

Post Reply