문제

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