Can PCRE regex match a null character?

Keng picture Keng · Apr 5, 2010 · Viewed 18.3k times · Source

I have a text source with nulls in it and I need to pull them out along with my regex pattern. Can regex even match a null character?

I only realized I had them when my pattern refused to match and when I pasted it into Notepad++ it showed all the null characters.

Answer

aaaaaaaaaaaa picture aaaaaaaaaaaa · Apr 5, 2010
\x00

That is a null char.