Hi All,I would like to replace some entities in the text file with symbols using Perl.This is working fine for some special symbols but for the characters such as Zeta we should use Unicode/Hexadecimal values - xcex96. We are doing like this s/&zeta1;/"xcexb6"/g; . This is working fine only for 2 characters such as xb6. How to use this in Perl? How to make use unicode value for zeta in Perl.Any kind of help will be appreciated.Thanks,Shiv

Showing Answers 1 - 7 of 7 Answers

Sunil Kartikey

  • Sep 15th, 2006
 

:%s/&zeta1;/"xcexb6"/gthis is working fine in vi.. u want it to rit as a perl code using some match for substitution?see for only some char which are taken as special meaning by perl u have to escape it using ' other wise it will replace nything u want.'

  Was this answer useful?  Yes

dhinesh kumar

  • Dec 14th, 2006
 

~s/&zeta1;/"xcexb6"/g; is working Fine. If there is any special character use in front of it.......

  Was this answer useful?  Yes

Sunil Kartikey

  • Jul 18th, 2007
 

Then use escape character.. 
suppose / is the part of string then you can write like / where is escape character

:%s/sunil/kartikey/kartikey/sunil/g

  Was this answer useful?  Yes

Give your answer:

If you think the above answer is not correct, Please select a reason and add your answer below.

 

Related Answered Questions

 

Related Open Questions