Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl Monk, Perl Meditation
 
PerlMonks  

Re: regex and substrings

by Corion (Patriarch)
on Jul 23, 2018 at 14:36 UTC ( [id://1219109]=note: print w/replies, xml ) Need Help??


in reply to regex and substrings

You could for example implement the criteria using these two rules:

  1. A string is a true substring of another if the other string starts with something else
  2. A string is a true substring of another if the other string ends with something else

Then you only need to find out how to construct an "or" condition for regular expressions and find implementations for "starts with", "ends with" and "something else".

See perlre for ideas on how to implement these.

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others making s'mores by the fire in the courtyard of the Monastery: (5)
As of 2024-03-28 23:46 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found