in reply to Lookbehind issues with unicode

The problem lies in the word "file", where "fi" can be represented by a ligature. Adding single /a doesn't help, but /aa solves the problem. So, if you don't work with unicode, you can just run your scripts like
perl -Mre=/aa -e 'my $var = "hello"; $var =~ s!(?<=\D[01] file)s!!ig;'
لսႽ† ᥲᥒ⚪⟊Ⴙᘓᖇ Ꮅᘓᖇ⎱ Ⴙᥲ𝇋ƙᘓᖇ

Replies are listed 'Best First'.
Re^2: Lookbehind issues with unicode
by mrbark (Acolyte) on Jul 21, 2015 at 17:00 UTC
    Unbelievable :) I would have never thought about that one! Thank you so much.
    Then there is less code to modify than I thought so I can probably modify these very specific regexps.