Beefy Boxes and Bandwidth Generously Provided by pair Networks
There's more than one way to do things
 
PerlMonks  

Re^4: A regex that only matches at offset that are multiples of a given N?

by BrowserUk (Patriarch)
on Feb 13, 2013 at 17:18 UTC ( [id://1018583]=note: print w/replies, xml ) Need Help??


in reply to Re^3: A regex that only matches at offset that are multiples of a given N?
in thread A regex that only matches at offset that are multiples of a given N?

Ah, you're using /g...

Yes. Sorry about failing to mention that. It was late and I was tired {excuse, excuse, excuse...}

in that case I'd just..

That is essentially what I doing (except with index) in Re: Store larg hashes more efficiently (10e6 md5s in 260MB at 4µs per lookup), because I couldn't work out how to get a regex to do it for me. Hence the question.

I'd rather push the check inside the regex engine if I could; and it seems like it should be a reasonable ask; but it has me totally stumped.

Even johngg's solution is flawed. :(


With the rise and rise of 'Social' network sites: 'Computers are making people easier to use everyday'
Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
"Science is about questioning the status quo. Questioning authority".
In the absence of evidence, opinion is indistinguishable from prejudice.
  • Comment on Re^4: A regex that only matches at offset that are multiples of a given N?

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others imbibing at the Monastery: (2)
As of 2024-04-26 01:03 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found