Go4Expert

Go4Expert (http://www.go4expert.com/)
-   Perl (http://www.go4expert.com/forums/perl/)
-   -   regex - issue in string processing. (http://www.go4expert.com/forums/regex-issue-string-processing-t14759/)

gk123987 24Oct2008 16:14

regex - issue in string processing.
 
i have a string,
name=../temp/config.xml../temp/set.xml --cfg../runtime/perl --uniq_id=perl;

Please not the above string is an eg, only

i need a parsed o/p
name = ../temp/config.xml ../temp/set.xml --cfg ../runtime/perl --uniq_id=perl;

Here when i tried to use the command
$line = s/..\// ..\//; (replace ../ with space ../) then i got the o/p as

name = ../temp/config.x ../temp
(note: .xml has been truncated to .x)
your input would be of help

gk123987 24Oct2008 16:37

Re: regex - issue in string processing.
 
sorry i found the root cause and it works.
it should be
$line = s/\.\.\// ..\//;


All times are GMT +5.5. The time now is 20:34.