Beefy Boxes and Bandwidth Generously Provided by pair Networks
P is for Practical
 
PerlMonks  

Re: regex and substrings

by Corion (Pope)
on Jul 23, 2018 at 14:36 UTC ( #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
Node Status?
node history
Node Type: note [id://1219109]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others meditating upon the Monastery: (3)
As of 2021-03-03 03:09 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    My favorite kind of desktop background is:











    Results (69 votes). Check out past polls.

    Notices?