Re: Overlapping Regular Expression Matches With findall()



Hello,

Thanks for your response. I was going by the definition in
the manual. I believe a search only returns the first
match of a regular expression pattern in a string and then
stops further searches if one is found. That's not what I
want.

I want a pattern that scans the entire string but avoids
returning duplicate matches. For example "cat", "cate",
"cater" may all well be valid matches, but I don't want
duplicate matches of any of them. I know I can filter the
list containing found matches myself, but that is somewhat
expensive for a list containing thousands of matches.

Thanks

.



Relevant Pages

  • Re: Parsing a string into an array
    ... pragmas to let perl help you find mistakes. ... split Splits a string into a list of strings and returns ... The first argument to splitis a regular expression pattern. ...
    (perl.beginners)
  • Re: regular expression reverse match?
    ... >> Is it possible to match a string to regular expression pattern instead ... I already know the search string... ... I was hoping to use regular expression patterns as a function argument ... accept only 10 of any type characters but not 11 ...
    (comp.lang.python)
  • Re: regexp includes a dot in string
    ... >I would like to use a regular expression pattern ... >match to search for a string containing a dot ... Prev by Date: ...
    (comp.lang.perl.misc)
  • Re: regexp includes a dot in string
    ... >> I would like to use a regular expression pattern ... >> match to search for a string containing a dot ... Prev by Date: ...
    (comp.lang.perl.misc)
  • Re: Replacing string containing quotes
    ... function removeOnclick { ... So you need to use the RegExp constructor and pass in a string with the ... regular expression pattern as you obviously want to have a different ... task as you need to take care of both string escape as well as regular ...
    (microsoft.public.scripting.jscript)