Beefy Boxes and Bandwidth Generously Provided by pair Networks
Problems? Is your data what you think it is?

Re^3: Stuck in komplexer regex, at least for me

by johngg (Abbot)
on Mar 26, 2007 at 16:25 UTC ( #606610=note: print w/replies, xml ) Need Help??

in reply to Re^2: Stuck in komplexer regex, at least for me
in thread Stuck in komplexer regex, at least for me

I'm afraid things are becoming more confusing rather than less. From the first four examples in your desired output I can guess at these rules:

Look for a sequence of two or more zeros

If the sequence found starts in position 1, 2 or 3, (counting from 1 but note that Perl usually counts from 0), replace all the zeros by nothing

If the sequence starts from position 4 or greater, replace all but one of the zeros with nothing

I can't see how the fifth example fits into anything you have described.



  • Comment on Re^3: Stuck in komplexer regex, at least for me

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://606610]
[stonecolddevin]: damn where's a working cblast? looks like several of them are out of commission
[erix]: Tanktalus home node has one
[stonecolddevin]: erix thanks mate
[stonecolddevin]: also lol @ "I stomped a crap"
[stonecolddevin]: Disciplus i was just amazed he's returned after the thorough stomp that BrowserUk and several other monks gave him for spreading crap info
[stonecolddevin]: i will admit i find the responses to his threads incredibly entertaining
[stonecolddevin]: erix what is this wizardy? there's no sound for me :-(

How do I use this? | Other CB clients
Other Users?
Others imbibing at the Monastery: (5)
As of 2017-06-22 20:46 GMT
Find Nodes?
    Voting Booth?
    How many monitors do you use while coding?

    Results (529 votes). Check out past polls.