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

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

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

Post by Debugger » Fri Mar 22, 2019 9:56 am

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: 141
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 » Fri Mar 22, 2019 10:47 am

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: 530
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 » Fri Mar 22, 2019 10:59 am

Ah, remove ^

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

Test:
[\x{200B}]
\x{200B}
\x{8203}

vanisk
Posts: 141
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 » Fri Mar 22, 2019 11:13 am

\x{200B} working fine for me in Notepad++ and in EmEditor

vanisk
Posts: 141
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 » Fri Mar 22, 2019 11:24 am

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
You do not have the required permissions to view the files attached to this post.

Debugger
Posts: 530
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 » Fri Mar 22, 2019 11:32 am

Code: Select all

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

https://postimg.cc/bdRM9xcV

vanisk
Posts: 141
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 » Fri Mar 22, 2019 11:41 am

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: 530
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 » Fri Mar 22, 2019 11:45 am

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

Post Reply