On Oct 10, 4:59 pm, Vlastimil Brom wrote:
> 2011/10/10 galyle :
>
>
>
>
>
>
>
>
>
> > HI, I've looked through this forum, but I haven't been able to find a
> > resolution to the problem I'm having (maybe I didn't look hard enough
> > -- I have to believe this has come up before). The problem is t
On Mon, Oct 10, 2011 at 4:49 PM, MRAB wrote:
> Instead of "\S" I'd recommend using "[^\]]", or using a lazy repetition
> "\S+?".
Preferably the former. The core problem is that the regex matches
ambiguously on the problem string. Lazy repetition doesn't remove
that ambiguity; it merely attempts
2011/10/10 galyle :
> HI, I've looked through this forum, but I haven't been able to find a
> resolution to the problem I'm having (maybe I didn't look hard enough
> -- I have to believe this has come up before). The problem is this:
> I have a file which has 0, 2, or 3 groups that I'd like to rec
On 10/10/2011 22:57, galyle wrote:
HI, I've looked through this forum, but I haven't been able to find a
resolution to the problem I'm having (maybe I didn't look hard enough
-- I have to believe this has come up before). The problem is this:
I have a file which has 0, 2, or 3 groups that I'd li
HI, I've looked through this forum, but I haven't been able to find a
resolution to the problem I'm having (maybe I didn't look hard enough
-- I have to believe this has come up before). The problem is this:
I have a file which has 0, 2, or 3 groups that I'd like to record;
however, in the case of
On Aug 12, 12:21 pm, [EMAIL PROTECTED] wrote:
>
> I cannot understand why 'c' constitutes a group here without being
> surrounded by "(" ,")" ?
>
> >>>import re
> >>> m = re.match("([abc])+", "abc")
> >>> m.groups()
>
> ('c',)
>
It sounds from the other replies that this is just the way re's work
In article <[EMAIL PROTECTED]>,
[EMAIL PROTECTED] wrote:
> Fairly new to this regex thing, so this might be very juvenile but
> important.
>
> I cannot understand and why 'c' constitutes a group here without being
> surrounded by "(" ,")" ?
>
> >>>import re
> >>> m = re.match("([abc])+", "abc")
[EMAIL PROTECTED] wrote:
> Fairly new to this regex thing, so this might be very juvenile but
> important.
>
> I cannot understand and why 'c' constitutes a group here without being
> surrounded by "(" ,")" ?
>
import re
m = re.match("([abc])+", "abc")
m.groups()
> ('c',)
>
> Grat
On Aug 12, 1:31 pm, Fabio Z Tessitore <[EMAIL PROTECTED]>
wrote:
> Il Sun, 12 Aug 2007 17:21:02 +, linnewbie ha scritto:
>
> > Fairly new to this regex thing, so this might be very juvenile but
> > important.
>
> > I cannot understand and why 'c' constitutes a group here without being
> > surro
[EMAIL PROTECTED] wrote:
> Fairly new to this regex thing, so this might be very juvenile but
> important.
>
> I cannot understand and why 'c' constitutes a group here without being
> surrounded by "(" ,")" ?
>
import re
m = re.match("([abc])+", "abc")
m.groups()
> ('c',)
>
> Grat
Il Sun, 12 Aug 2007 17:21:02 +, linnewbie ha scritto:
> Fairly new to this regex thing, so this might be very juvenile but
> important.
>
> I cannot understand and why 'c' constitutes a group here without being
> surrounded by "(" ,")" ?
>
import re
m = re.match("([abc])+", "abc")
>
Fairly new to this regex thing, so this might be very juvenile but
important.
I cannot understand and why 'c' constitutes a group here without being
surrounded by "(" ,")" ?
>>>import re
>>> m = re.match("([abc])+", "abc")
>>> m.groups()
('c',)
Grateful for any clarity.
--
http://mail.python.o
12 matches
Mail list logo