问题
The emoji sequence "👩❤️💋👩" does not seem to be rendered as a sequence on notepad++ and regex101.com (It is rendered as 4-7 characters depending if you count the joiners)
Anyways, I would expect that both .*
and (?:.)*
would behave the same way, but that does not seem to be the case with notepad++ (It works as expected on regex101)
On notepad++ .*
seems to match all characters, but (?:.)*
does not.
For example, given this input:
foobar👩❤️💋👩
.*
will match everything (foobar👩❤️💋👩
)
(?:.)*
will match foobar
foollowed by several zero-width matches between the emojis.
Why I am getting those results? Is it a bug on the Boost regex engine? Or the main reason behind is notepad++ not displaying correctly the emoji sequence? In that case, why does it work on regex101?
Edit:
[\s\S]*
does not seem to work also. It behaves the same way as (?:.)*
来源:https://stackoverflow.com/questions/55765464/strange-behaviour-with-boost-regex-and-emojis