Problem with the PCRE engine, does not search for some Unicode (HTML, SCRIPT).

General discussion related to "Everything".
Post Reply
Debugger
Posts: 630
Joined: Thu Jan 26, 2017 11:56 am

Problem with the PCRE engine, does not search for some Unicode (HTML, SCRIPT).

Post by Debugger »

Problem with the PCRE engine,
does not search for some Unicode.

regex:[^\x{200B}]

I would ask for a compatible Regex for Everything (PCRE), for Boost.Regex and .NET Regex

Image
vanisk
Posts: 152
Joined: Sat Oct 27, 2018 11:33 am

Re: Problem with the PCRE engine, does not search for some Unicode (HTML, SCRIPT).

Post by vanisk »

You are searching for all characters except 200B (Unicode Character 'ZERO WIDTH SPACE'). Its what everything did. (NOT 200B).
Last edited by vanisk on Fri Mar 22, 2019 6:03 pm, edited 1 time in total.
Debugger
Posts: 630
Joined: Thu Jan 26, 2017 11:56 am

Re: Problem with the PCRE engine, does not search for some Unicode (HTML, SCRIPT).

Post by Debugger »

Ah, remove ^

But why does not this work in the Emeditor?
Cannot Find:

Test:
[\x{200B}]
\x{200B}
\x{8203}
vanisk
Posts: 152
Joined: Sat Oct 27, 2018 11:33 am

Re: Problem with the PCRE engine, does not search for some Unicode (HTML, SCRIPT).

Post by vanisk »

\x{200B} working fine for me in Notepad++ and in EmEditor
vanisk
Posts: 152
Joined: Sat Oct 27, 2018 11:33 am

Re: Problem with the PCRE engine, does not search for some Unicode (HTML, SCRIPT).

Post by vanisk »

As 200B is invisible character, even if EmEditor/Notepad++/others finds it and moves cursor to the position, We may not see the cursor.

So try this
.\x{200B}.

It will find 3 characters (but shows 2 characters) and the middle character is ZWSP. So you know where the Zerowidth Space is.

(NB:Tried with Notepad++ and EmEditor and it works)

EmEditor_ZWSP.jpg
EmEditor_ZWSP.jpg (74.16 KiB) Viewed 6817 times
Debugger
Posts: 630
Joined: Thu Jan 26, 2017 11:56 am

Re: Problem with the PCRE engine, does not search for some Unicode (HTML, SCRIPT).

Post by Debugger »

Code: Select all

.\x{200B}.
Big thanks, now it works

https://postimg.cc/bdRM9xcV
vanisk
Posts: 152
Joined: Sat Oct 27, 2018 11:33 am

Re: Problem with the PCRE engine, does not search for some Unicode (HTML, SCRIPT).

Post by vanisk »

Debugger wrote: Fri Mar 22, 2019 11:32 am

Code: Select all

.\x{200B}.
Big thanks, now it works

https://postimg.cc/bdRM9xcV
Glad it worked. But it will not work if the ZWSP is in the beginning or at the end of line.
Debugger
Posts: 630
Joined: Thu Jan 26, 2017 11:56 am

Re: Problem with the PCRE engine, does not search for some Unicode (HTML, SCRIPT).

Post by Debugger »

beginning or at the end of line.
I checked it, it works for me ;)
Post Reply