Syntactic Confectionery Delight | |
PerlMonks |
search and replace desired portion from a lineby syedasadali95 (Acolyte) |
on May 29, 2019 at 07:36 UTC ( [id://11100686]=perlquestion: print w/replies, xml ) | Need Help?? |
syedasadali95 has asked for the wisdom of the Perl Monks concerning the following question: Hi monks, I am trying to search and replace a desired portion from a line using perl but not able to match regex to the end of a word. let me explain the issue below Line:
Code:
Result:
Unfortunately my code is trimming the rest of the line after addr field which shouldn't happen. expected result:
Please suggest a solution to match next white space after addr field or to match end of string and replace. I've tried $, \s, \S, \z, \', etc. But doesn't worked well 2019-05-30 Athanasius added code tags
Back to
Seekers of Perl Wisdom
|
|