質問

I want to find x0027; this and change to x2019; hexadecimal value in a string;

I tried :

$string =~s/\x{0027}/\x{2019}/g;

but not working

Kindly anyone give some suggestion to solve this

Thanks

役に立ちましたか?

解決

No need of \ or { } brackets.

$string =~ s/x0027/x2019/g;

他のヒント

Remove the curly brackets:

$string =~s/\x0027/\x2019/g;

or if there're present in the original string, escape them:

$string =~s/\x\{0027\}/\x\{2019\}/g;
ライセンス: CC-BY-SA帰属
所属していません StackOverflow
scroll top