On 22/07/2006 2:18 AM, Simon Forman wrote:
> John Salerno wrote:
>> Simon Forman wrote:
>>
>>> Python's re.match() matches from the start of the string, so if you
(1) Every regex library's match() starts matching from the beginning of
the string (unless of course there's an arg for an explicit s
On 22/07/2006 9:25 AM, John Machin wrote:
Apologies if this appears twice ... post to the newsgroup hasn't shown
up; trying the mailing-list.
> On 22/07/2006 2:18 AM, Simon Forman wrote:
>> John Salerno wrote:
>>> Simon Forman wrote:
>>>
Python's re.match() matches from the start of the str
John Salerno wrote:
> Thanks guys!
A pleasure. : )
--
http://mail.python.org/mailman/listinfo/python-list
Simon Forman wrote:
> John Salerno wrote:
>> Simon Forman wrote:
>>
>>> Python's re.match() matches from the start of the string, so if you
>>> want to ensure that the whole string matches completely you'll probably
>>> want to end your re pattern with the "$" character (depending on what
>>> the r
John Salerno wrote:
> Simon Forman wrote:
>
> > Python's re.match() matches from the start of the string, so if you
> > want to ensure that the whole string matches completely you'll probably
> > want to end your re pattern with the "$" character (depending on what
> > the rest of your pattern matc
John Salerno wrote:
> Simon Forman wrote:
>
>
>>Python's re.match() matches from the start of the string, so if you
>>want to ensure that the whole string matches completely you'll probably
>>want to end your re pattern with the "$" character (depending on what
>>the rest of your pattern matches.
Simon Forman wrote:
> Python's re.match() matches from the start of the string, so if you
> want to ensure that the whole string matches completely you'll probably
> want to end your re pattern with the "$" character (depending on what
> the rest of your pattern matches.)
Is that necessary? I was
On Friday 21 July 2006 10:57 am, abcd wrote:
> yea i saw thatguess I was trusting that my regex was accurate :)
> ...b/c i was getting a Matcher when I shouldnt have, but i found that
> it must be the regex.
http://kodos.sourceforge.net/
Makes regex generation and debugging much easier.
--
abcd wrote:
> how can i determine if a given character sequence matches my regex,
> completely?
>
> in java for example I can do,
> Pattern.compile(regex).matcher(input).matches()
>
> this returns True/False whether or not input matches the regex
> completely.
>
> is there a matches in python?
Yes
yea i saw thatguess I was trusting that my regex was accurate :)
...b/c i was getting a Matcher when I shouldnt have, but i found that
it must be the regex.
--
http://mail.python.org/mailman/listinfo/python-list
abcd wrote:
> how can i determine if a given character sequence matches my regex,
> completely?
>
> in java for example I can do,
> Pattern.compile(regex).matcher(input).matches()
>
> this returns True/False whether or not input matches the regex
> completely.
>
> is there a matches in python?
how can i determine if a given character sequence matches my regex,
completely?
in java for example I can do,
Pattern.compile(regex).matcher(input).matches()
this returns True/False whether or not input matches the regex
completely.
is there a matches in python?
--
http://mail.python.org/mailm
Mystilleef wrote:
> Thanks for your response. I was going by the definition in
> the manual.
"non-overlapping" in that context means that if you e.g. search for "(ba)+"
in the string "bababa", you get one match ("bababa"), not three or six.
in your case, it sounds like you want a search for "ba"
On Thu, 15 Dec 2005 20:33:42 +, Simon Brunning <[EMAIL PROTECTED]> wrote:
>On 15 Dec 2005 12:26:07 -0800, Mystilleef <[EMAIL PROTECTED]> wrote:
>> I want a pattern that scans the entire string but avoids
>> returning duplicate matches. For example "cat", "cate",
>> "cater" may all well be vali
On 15 Dec 2005 12:26:07 -0800, Mystilleef <[EMAIL PROTECTED]> wrote:
> 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
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 avoi
"Mystilleef" wrote:
> Is there a simple flag to set to allow overlapping matches
> for the findall() regular expression method? In other words,
> if a string contains five occurrences of the string pattern
> "cat", calling findall on the string returns a list
> containing five "cat" strings. Is it
Hello,
Is there a simple flag to set to allow overlapping matches
for the findall() regular expression method? In other words,
if a string contains five occurrences of the string pattern
"cat", calling findall on the string returns a list
containing five "cat" strings. Is it possible for findall()
18 matches
Mail list logo