texuser has asked for the wisdom of the Perl Monks concerning the following question:
I have strings embedded in a file with other text that look like this
{ Name 1.2.3 xxxx xxxxx}
where xxxx and xxxxx could be a-z, 0-9 or : (a single colon).
There could be one or more spaces after { and before the } and there could be one or more spaces between the groups in the string. Also the string could be split over two lines like
{ Name 1.2.3
xxxx xxxxx }
{ Name 1.2.
3 xxxx xxxxx}
{ Name 1.2.3 xxxx
xxxxx }.
So it could be split at a space or after a dot. There could be one or more spaces at the end of the split line before the newline like this
{ Name 1.2.3\ \ \ \
xxxx }
where I use \ to denote a space.
My question is how do I get rid of all these strings in a file. I'm using Perl under Windows 10 if that helps.
Thanks.
|
|---|