Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Recompiling a RegExp at runtime using \p fails #411

Open
atoomic opened this issue Jul 19, 2017 · 2 comments
Open

Recompiling a RegExp at runtime using \p fails #411

atoomic opened this issue Jul 19, 2017 · 2 comments

Comments

@atoomic
Copy link
Collaborator

atoomic commented Jul 19, 2017

When recompiling a regexp using \p the recompiled RegExp is incorrect

our ( $q, $myre );
BEGIN { $q = qr[\p{IsWord}] }
eval q/$myre = qr[^$q]/; # add ^ to force the RegExp to be recompiled
print qq[match ok\n] if q[hello] =~ $myre;

The compiled version output nothing (no segfault) whereas we should expect match ok output

tested with HEAD @ 5f74704

@rurban
Copy link
Owner

rurban commented Jul 22, 2017

MOTHER_RE is missing from $q, the REGEXP.
That's the only difference I've found, and the most likely cause to create a OPFAIL (-Dr) instead of the POSIXU[\w]

@atoomic
Copy link
Collaborator Author

atoomic commented Aug 1, 2017

we have added a function to utf8 heavy to clear the cache to solve this issue
view cpanel@4993d9b

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants