in reply to Re: regex match unicode characters in ascii string
in thread regex match unicode characters in ascii string

Thank you!, I thought about this, but if I don't replace the extended ascii character with a space, how will i differentiate the group name with the role identifier?
- 3dbc
  • Comment on Re^2: regex match unicode characters in ascii string

Replies are listed 'Best First'.
Re^3: regex match unicode characters in ascii string
by haukex (Archbishop) on Jan 27, 2017 at 20:36 UTC

    Hi 3dbc,

    replace the extended ascii character with a space
    $string =~ tr/\x09\x0A\x0D\x20-\x7E/ /c;

    See the documentation of tr/SEARCHLIST/REPLACEMENTLIST/cdsr under "Quote-Like Operators" in perlop.

    Hope this helps,
    -- Hauke D