Using the formula my $re = qr/^([\/\w]+)/; as the pattern has the same problems.
For clarity, the test script which I provided works just as well with this regex. The point is that it demonstrates that there is nothing wrong with your perl code which does the regex matching and therefore the only logical conclusion is that your data is not what you think it is.
Are you decoding your UTF-8 data when you read it from the data files in your script? If not, that is the problem.
If you can provide a real SSCCE then I'm sure all will become clear.
🦛
In reply to Re^7: UTF8 versus \w in pattern matching
by hippo
in thread UTF8 versus \w in pattern matching
by mldvx4
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |