Beefy Boxes and Bandwidth Generously Provided by pair Networks
Keep It Simple, Stupid

Re: Regex: finding all possible substrings

by sauoq (Abbot)
on May 31, 2012 at 23:03 UTC ( #973634=note: print w/ replies, xml ) Need Help??

in reply to Regex: finding all possible substrings

A regular expression probably isn't the best way to do what you want... certainly not just one, at any rate.

You are probably better iterating through the string you are searching, grabbing substrings the length of the strings you are searching for, and looking them up in a hash table.

Or something similar.

"My two cents aren't worth a dime.";

Comment on Re: Regex: finding all possible substrings

Log In?

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

How do I use this? | Other CB clients
Other Users?
Others imbibing at the Monastery: (4)
As of 2015-11-30 00:40 GMT
Find Nodes?
    Voting Booth?

    What would be the most significant thing to happen if a rope (or wire) tied the Earth and the Moon together?

    Results (755 votes), past polls