Feature #4374

Add support for PCRE regex queries / library (was: Regex fulltext with negative lookahead)

Added by Dirk Diggler 3 months ago. Updated 3 months ago.

Status:FixedStart date:2017-05-15
Priority:NormalDue date:
Assignee:-% Done:

0%

Category:-
Target version:4.4

Description

Hello,

what i wanted is to search for "AAA", but also exclude "BBB".

Without fullext it is working with [^BBB]AAA (thank you mpmc from IRC).

But we discovered this is not working in fulltext.

Can you please fix that?
Thank you, DocMAX.

Unbenannt3.JPG (114 KB) Dirk Diggler, 2017-05-18 22:20

History

#1 Updated by Jaroslav Kysela 3 months ago

  • Subject changed from Regex fulltext with negative lookahead to Add support for PCRE regex queries / library (was: Regex fulltext with negative lookahead)

The match is wrong. [^ABC] means "match any character except characters 'A' 'B' 'C'".

#2 Updated by Jaroslav Kysela 3 months ago

  • Target version set to 4.4

#3 Updated by Jaroslav Kysela 3 months ago

  • Tracker changed from Bug to Feature

#4 Updated by Dirk Diggler 3 months ago

I studied the differences POSIX ERE and PCRE.
This feature would be a killer-feature!
Can wait for it... looking forward.

#5 Updated by Jaroslav Kysela 3 months ago

  • Status changed from New to Fixed

Added to v4.3-86-g7d2c4e8 (both libpcre and libpcre2 libraries are supported).

Example query (match 'players' but exclude 'championship'): https://regex101.com/r/Wg9cxw/1

(?=.*\bplayers\b)(?!.*\bchampionship\b)

#6 Updated by Dirk Diggler 3 months ago

Perfect, will compile now and try... Thank you!!!

#7 Updated by Dirk Diggler 3 months ago

Hmm, it's ok, but PCRE should get standard (no extra checkbox!).
There is no option to activate PCRE in the EPG search window (1st tab)...

#8 Updated by Jaroslav Kysela 3 months ago

All suggested changes are in v4.3-100-ga25f02f including JIT optimizations for pcre2.

#9 Updated by Dirk Diggler 3 months ago

Thank you very much for the quick support + coding.
I will come with other suggestions.
I have a lot of ideas...

#10 Updated by Dirk Diggler 3 months ago

Doesn't seem to work in "Subtitle"... can you doublecheck this please?
The results should'n show anything with "Deutschland"... see attachment...

Also available in: Atom PDF