Perl regular expression matching on large Unicode code points
问题 I am trying to replace various characters with either a single quote or double quote. Here is my test file: # Replace all with double quotes " fullwidth “ left ” right „ low " normal # Replace all with single quotes ' normal ‘ left ’ right ‚ low ‛ reverse ` backtick I'm trying to do this... perl -Mutf8 -pi -e "s/[\x{2018}\x{201A}\x{201B}\x{FF07}\x{2019}\x{60}]/'/ug" test.txt perl -Mutf8 -pi -e 's/[\x{FF02}\x{201C}\x{201D}\x{201E}]/"/ug' text.txt But only the backtick character gets replaced