in reply to remove specific spaces within some patternme
Can you explain better how is your expected data and the desired pattern that you want to match?
perl -pi'*.bak' -e 's/Common Public License v/CommonPublicLicensev/' m +yfile perl -pi'*.bak' -e 's/\s-\s/-/' myfile
Update. Or even better:
perl -pi.bak -e 's/Common Public License v/CommonPublicLicensev/' -e 's/\s-\s/-/' myfileAnd second update. It seems that the desired patterns can appear several times in the same line, so you need to add a final g here: 's/Common Public License v/CommonPublicLicensev/g' and here 's/\s-\s/-/g'
And that's all
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: remove specific spaces within some patternme
by gdanenb (Acolyte) on Oct 24, 2011 at 12:03 UTC | |
by pvaldes (Chaplain) on Oct 24, 2011 at 13:40 UTC | |
by Anonymous Monk on Oct 24, 2011 at 19:30 UTC |