Hallöchen!
Charles Sanders writes:
> Torsten Bronger wrote:
>
> [...]
>
Example string: u"Hollo", escaped positions: [4]. Thus, the
second "o" is escaped and must not be found be the regexp
searches.
Instead of re.search, I call the function guarded_search(pattern,
Torsten Bronger wrote:
> Hallöchen!
[...]
>>>
>>> Example string: u"Hollo", escaped positions: [4]. Thus, the
>>> second "o" is escaped and must not be found be the regexp
>>> searches.
>>>
>>> Instead of re.search, I call the function guarded_search(pattern,
>>> text, offset) which takes care of
Hallöchen!
John Machin writes:
> On May 18, 6:00 am, Torsten Bronger <[EMAIL PROTECTED]>
> wrote:
>
>> [...]
>>
>> Example string: u"Hollo", escaped positions: [4]. Thus, the
>> second "o" is escaped and must not be found be the regexp
>> searches.
>>
>> Instead of re.search, I call the function
On May 18, 9:46 am, Paul McGuire <[EMAIL PROTECTED]> wrote:
> On May 17, 6:12 pm, John Machin <[EMAIL PROTECTED]> wrote:
>
> > Note: "must not be *part of* any match" [my emphasis]
>
>
> > While we're waiting for clarification from the OP, there's a chicken-
> > and-egg thought that's been nagging
On May 17, 6:12 pm, John Machin <[EMAIL PROTECTED]> wrote:
>
> Note: "must not be *part of* any match" [my emphasis]
>
Ooops, my bad. See this version:
from pyparsing import Regex,ParseException,col,lineno,getTokensEndLoc
# fake (and inefficient) version of any if not yet upgraded to Py2.5
any =
On May 18, 8:16 am, Paul McGuire <[EMAIL PROTECTED]> wrote:
> On May 17, 4:06 pm, John Machin <[EMAIL PROTECTED]> wrote:
>
>
>
> > On May 18, 6:00 am, Torsten Bronger <[EMAIL PROTECTED]>
> > wrote:
>
> > > Hallöchen!
>
> > > James Stroud writes:
> > > > Torsten Bronger wrote:
>
> > > >> I need some
On May 17, 4:06 pm, John Machin <[EMAIL PROTECTED]> wrote:
> On May 18, 6:00 am, Torsten Bronger <[EMAIL PROTECTED]>
> wrote:
>
>
>
>
>
> > Hallöchen!
>
> > James Stroud writes:
> > > Torsten Bronger wrote:
>
> > >> I need some help with finding matches in a string that has some
> > >> characters w
On May 18, 6:50 am, James Stroud <[EMAIL PROTECTED]> wrote:
> def guarded_search(rgx, astring, escaped):
>m = re.search(rgx, astring)
>if m:
> s = m.start()
> e = m.end()
> for i in escaped:
>if s <= i <= e:
Did you mean to write
if s <= i < e:
?
> m =
On May 18, 6:00 am, Torsten Bronger <[EMAIL PROTECTED]>
wrote:
> Hallöchen!
>
> James Stroud writes:
> > Torsten Bronger wrote:
>
> >> I need some help with finding matches in a string that has some
> >> characters which are marked as escaped (in a separate list of
> >> indices). Escaped means tha
Torsten Bronger wrote:
> Hallöchen!
>
> James Stroud writes:
>
>
>>Torsten Bronger wrote:
>>
>>
>>>I need some help with finding matches in a string that has some
>>>characters which are marked as escaped (in a separate list of
>>>indices). Escaped means that they must not be part of any match.
Hallöchen!
James Stroud writes:
> Torsten Bronger wrote:
>
>> I need some help with finding matches in a string that has some
>> characters which are marked as escaped (in a separate list of
>> indices). Escaped means that they must not be part of any match.
>>
>> [...]
>
> You should probably p
Torsten Bronger wrote:
> Hallöchen!
>
> I need some help with finding matches in a string that has some
> characters which are marked as escaped (in a separate list of
> indices). Escaped means that they must not be part of any match.
>
> My current approach is to look for matches in substrings
12 matches
Mail list logo