edwardt_tril has asked for the wisdom of the Perl Monks concerning the following question:
but I don't know how to replace strings that contrain certain characters embeded within them: for example:
source string 1230,5,6,12344,adblock.dll,c:\program files\document and settings\1800cursor.dll,,,,,123,1,2,2 new string: 1230,5,6,12344,adblock.dll,c:\program files\system32\afvdefdcec.exel,,,,,123,1,2,2 another example: 12,3,4,ascii sample,123,c:\ascii\121243.php,1,3,45,5 to 12,3,4,hi-ascii sample,123,c:\@#$%^.rexehp,1,3,45,5
the only thing I know it ia position based. how can i do that? my goal is to make a function that takes (sourceline, source_word,replacement) then it will do the replacement regardless all these 3 parameters contain hiascii,ascii, or dbcs.. how to archieve that. I only have a version that works with ascii and without those special characters like \ ....
please help.
GrandFather fixed formatting
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: string replacement question
by Zaxo (Archbishop) on Nov 30, 2005 at 06:31 UTC | |
by edwardt_tril (Sexton) on Nov 30, 2005 at 07:17 UTC | |
by Zaxo (Archbishop) on Nov 30, 2005 at 07:28 UTC | |
|
Re: string replacement question
by serf (Chaplain) on Nov 30, 2005 at 06:48 UTC |