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

What do you get if you print your string with Data::Dump like this

#!perl use strict; use HTML::Entities; use Data::Dump 'pp'; my $string = decode_entities( "Role: Role Name▼▼Profile: Unnecessary_Extra_Stuff"); pp $string;

Replies are listed 'Best First'.
Re^10: regex match unicode characters in ascii string
by 3dbc (Monk) on Jan 27, 2017 at 22:40 UTC
    Thanks for all the help Monks.

    This worked for me... (taken out of context, it's part of a much larger script...)

    ${$ref}{$k}{'DIRTYDATA'} =~ tr/\x09\x0A\x0D\x20-\x7E/ /c; while ( ${$ref}{$k}{'DIRTYDATA'} =~ /(Group|Role[\s2]*)\:\s(\w ++\s\w+)\s*/g ){ ${$ref}{$k}{$1} = $2; } print "\n\nThis is the group: " . ${$ref}{$k}{Group}; print "\nThis is the Role: " . ${$ref}{$k}{Role} . "\n\n";
    - 3dbc