Beefy Boxes and Bandwidth Generously Provided by pair Networks
laziness, impatience, and hubris
 
PerlMonks  

Re^2: remove specific spaces within some patternme

by gdanenb (Acolyte)
on Oct 24, 2011 at 12:03 UTC ( #933366=note: print w/ replies, xml ) Need Help??


in reply to Re: remove specific spaces within some patternme
in thread remove specific spaces within some patternme

The string I posted was just an example
It's taken from Solaris Prototype file used for packaging.
So,it much more than that

f none jboss/docs/licenses/BSD style license - bsd.txt=$CELL/docs/lice +nses/BSD style license - bsd.txt 0644 $CELL_USER $CELL_GROUP f none jboss/docs/licenses/BSD style - license.html=$CELL/docs/license +s/BSD style - license.html 0644 $CELL_USER $CELL_G ROUP f none jboss/docs/licenses/Common Development And Distribution License + (CDDL) Version 1.0 - cddl.html=$CELL/docs/licenses/Common Developmen +t And Distribution License (CDDL) Version 1.0 - cddl.html 0644 $CELL_ +USER $CELL_GROUP


Comment on Re^2: remove specific spaces within some patternme
Download Code
Re^3: remove specific spaces within some patternme
by pvaldes (Chaplain) on Oct 24, 2011 at 13:40 UTC
    It seems that you don't have here a decently constant pattern. Alternativelly you could also replace all spaces by "nothing" and then restore two or three exceptions, like fnonejboss, etc. It depends a lot on your specific input data file
Re^3: remove specific spaces within some patternme
by Anonymous Monk on Oct 24, 2011 at 19:30 UTC
    perl -pe 's: (?!.*\bjboss/)(?=.* 0644 )::g'

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://933366]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others meditating upon the Monastery: (11)
As of 2014-07-12 07:29 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    When choosing user names for websites, I prefer to use:








    Results (238 votes), past polls