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
In reply to Re: remove specific spaces within some patternme
by pvaldes
in thread remove specific spaces within some patternme
by gdanenb
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |