Re: String Pattern Matching: regex and Python regex documentation

2006-09-26 Thread Ilias Lazaridis
Steve Holden wrote: > Xah Lee wrote: ... > > This project was undertaken as a response to a challenge put forth to > > me with a $100 reward, on 2005-04-12 on comp.lang.python newsgroup. I > > never received the due reward. > > > Your reading skills must be terrible. You never received the reward >

Re: String Pattern Matching: regex and Python regex documentation

2006-09-24 Thread Steve Holden
Xah Lee wrote: > Xah Lee wrote: > « the Python regex documentation is available at: > http://xahlee.org/perl-python/python_re-write/lib/module-re.html ...» > > Jürgen Exner wrote: > «Yeah, sure, and the Perl regex documentation is available at 'perldoc > perlre'. So what? Is that anything new or

Re: String Pattern Matching: regex and Python regex documentation

2006-09-24 Thread Xah Lee
Xah Lee wrote: « the Python regex documentation is available at: http://xahlee.org/perl-python/python_re-write/lib/module-re.html ...» Jürgen Exner wrote: «Yeah, sure, and the Perl regex documentation is available at 'perldoc perlre'. So what? Is that anything new or surprising?» It is of inter

Re: String Pattern Matching: regex and Python regex documentation

2006-09-22 Thread J�rgen Exner
Ilias Lazaridis wrote: > Xah Lee wrote: >> the Python regex documentation is available at: >> http://xahlee.org/perl-python/python_re-write/lib/module-re.html Yeah, sure, and the Perl regex documentation is available at 'perldoc perlre'. So what? Is that anything new or surprising? jue -- ht

Re: String Pattern Matching: regex and Python regex documentation

2006-09-22 Thread John Machin
Paul McGuire wrote: > "Steve Holden" <[EMAIL PROTECTED]> wrote in message > news:[EMAIL PROTECTED] > > > > > Ilias Lazardis meets Xah Lee. I just *know* we're in for trouble now ... > > > > regards > > Steve > > A sign of the End Times, perhaps? > Indeed. Armageddon outa here ;-) -- http://

Re: String Pattern Matching: regex and Python regex documentation

2006-09-22 Thread Paul McGuire
"Steve Holden" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > > Ilias Lazardis meets Xah Lee. I just *know* we're in for trouble now ... > > regards > Steve A sign of the End Times, perhaps? -- Paul -- http://mail.python.org/mailman/listinfo/python-list

Re: String Pattern Matching: regex and Python regex documentation

2006-09-22 Thread Steve Holden
Ilias Lazaridis wrote: > [followup to c.l.py] > > Xah Lee wrote: > >>the Python regex documentation is available at: >>http://xahlee.org/perl-python/python_re-write/lib/module-re.html >> >>Note that, i've just made the terms of use clear. >> >>Also, can anyone answer what is the precise terms of

Re: String Pattern Matching: regex and Python regex documentation

2006-09-22 Thread Ilias Lazaridis
[followup to c.l.py] Xah Lee wrote: > the Python regex documentation is available at: > http://xahlee.org/perl-python/python_re-write/lib/module-re.html > > Note that, i've just made the terms of use clear. > > Also, can anyone answer what is the precise terms of license of the > official python

String Pattern Matching: regex and Python regex documentation

2006-09-17 Thread Xah Lee
the Python regex documentation is available at: http://xahlee.org/perl-python/python_re-write/lib/module-re.html Note that, i've just made the terms of use clear. Also, can anyone answer what is the precise terms of license of the official python documentation? The official python.org doc site is

Re: String pattern matching

2006-04-16 Thread Jim Lewis
>You can do this with a regular expression... I tried the plain RE approach and found it no faster than my direct-coded version. Anyone have any ideas on how to code this problem elegantly without RE? My code is long and cumbersome - 200 lines! Speed is my primary concern but low LOC would be nice

Re: String pattern matching

2006-04-05 Thread Kent Johnson
[EMAIL PROTECTED] wrote: > Thanks to all for the various good approaches. Kent's plain RE approach > seems the most straightforward - did not know that RE can handle this > situation - good to know! Thanks to Eddie Corns also who showed how to express the problem as a parsing problem. I am also

Re: String pattern matching

2006-04-05 Thread jimlewis
Thanks to all for the various good approaches. Kent's plain RE approach seems the most straightforward - did not know that RE can handle this situation - good to know! -- http://mail.python.org/mailman/listinfo/python-list

Re: String pattern matching

2006-04-03 Thread Eddie Corns
Kent Johnson <[EMAIL PROTECTED]> writes: >Eddie Corns wrote: >> If I get time I'll try to get this working in Sam Wilmott's Python pattern >> matching library. >> >> What fun! >Cool! I have to get in on the fun :-) >This program uses Sam Wilmott's library to find one solution. It is a >simple

Re: String pattern matching

2006-04-03 Thread Kent Johnson
Jim Lewis wrote: > Anyone have experience with string pattern matching? > I need a fast way to match variables to strings. Example: > > string - variables > > abcaaab - xyz > abca - xy > eeabcac - vxw > > x matches abc > y matches a > z mat

Re: String pattern matching

2006-04-03 Thread Kent Johnson
Eddie Corns wrote: > Off topic I know but I've been learning snobol pattern matching recently so I > thought I'd give this one a bash. Here is my effort: > > define('foo(str)') > &fullscan = 1 > '/abcaaab/abca/eeabcac/' '/' arb $ x arb $ y arb $ z '/' *x *y '/' > +

Re: String pattern matching

2006-04-03 Thread Eddie Corns
"Jim Lewis" <[EMAIL PROTECTED]> writes: >Anyone have experience with string pattern matching? >I need a fast way to match variables to strings. Example: >string - variables > >abcaaab - xyz >abca - xy >eeabcac - vxw >x matches abc >y matc

Re: String pattern matching

2006-04-02 Thread Jim Lewis
Thanks for the interesting and detailed analysis. In my case I don't need all possible answers by rather the first "greedy" match. Seems like there might be some recursive approach. -- http://mail.python.org/mailman/listinfo/python-list

Re: String pattern matching

2006-04-01 Thread forward
Firstly sort variable expressions by its length xy = 'abca' xyz = 'abcaaab' vxw = 'eeabcac' Expand all expressions by its values except itself xy = 'abca' 'abca' z = 'abcaaab' vxw = 'eeabcac' Cut all left and right matches xy = 'abca' z = 'aab' vxw = 'eeabcac' Repeat until you

String pattern matching

2006-04-01 Thread Jim Lewis
Anyone have experience with string pattern matching? I need a fast way to match variables to strings. Example: string - variables abcaaab - xyz abca - xy eeabcac - vxw x matches abc y matches a z matches aab w maches ac v maches ee -- http://mail.python.org/mailman/listinfo/python

Re: [perl-python] string pattern matching

2005-02-02 Thread Chris Smith
> Stephen Thorne <[EMAIL PROTECTED]> writes: > On Tue, 01 Feb 2005 21:19:34 -0500, Chris Smith > <[EMAIL PROTECTED]> wrote: >> Falls into the 'cure worse than the disease' category. It's >> really just a prompt to explore the corners of Gnus, and >> determine how to give X

Re: [perl-python] string pattern matching

2005-02-01 Thread Erik Max Francis
Daniel Fackrell wrote: It seems to me that application of one of these solutions reduces the effectiveness of the other. If enough persons killfile the threads, who warns the newbies? And so those who don't killfile the threads to ensure that somebody is still guarding against misleading informat

Re: [perl-python] string pattern matching

2005-02-01 Thread Daniel Fackrell
- Henry Wadsworth Longfellow "Erik Max Francis" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Dan Perl wrote: > > > Perhaps someone will write a program to automatically follow up on every > > [perl-python] posting? The follow-up could just contain a statement like > > the one Dani

Re: [perl-python] string pattern matching

2005-02-01 Thread Stephen Thorne
On Tue, 01 Feb 2005 21:19:34 -0500, Chris Smith <[EMAIL PROTECTED]> wrote: > Falls into the 'cure worse than the disease' category. > It's really just a prompt to explore the corners of Gnus, and > determine how to give X.L. the thorough ignoring he deserves. *headdesk* I'm using gmail, and I can

Re: [perl-python] string pattern matching

2005-02-01 Thread Chris Smith
> Stephen Thorne <[EMAIL PROTECTED]> writes: > On Tue, 1 Feb 2005 18:59:18 -0500, Dan Perl <[EMAIL PROTECTED]> wrote: >> Perhaps someone will write a program to automatically follow up >> on every [perl-python] posting? The follow-up could just >> contain a statement like the

Re: [perl-python] string pattern matching

2005-02-01 Thread Erik Max Francis
Dan Perl wrote: Perhaps someone will write a program to automatically follow up on every [perl-python] posting? The follow-up could just contain a statement like the one Daniel mentions. Obviously the program would be written in python. ;-) I'm not really sure that such a disclaimer is explici

Re: [perl-python] string pattern matching

2005-02-01 Thread Stephen Thorne
On Tue, 1 Feb 2005 18:59:18 -0500, Dan Perl <[EMAIL PROTECTED]> wrote: > Perhaps someone will write a program to automatically follow up on every > [perl-python] posting? The follow-up could just contain a statement like > the one Daniel mentions. Obviously the program would be written in python.

Re: [perl-python] string pattern matching

2005-02-01 Thread Dan Perl
Perhaps someone will write a program to automatically follow up on every [perl-python] posting? The follow-up could just contain a statement like the one Daniel mentions. Obviously the program would be written in python. ;-) Any suggestions on how to implement such a program? How would it de

Re: [perl-python] string pattern matching

2005-02-01 Thread Daniel Fackrell
Perhaps a message to the effect of "These messages are specifically disowned by the groups to which they are posted, have historically been riddled with blatant errors, and are assumed to continue in the same quality." should be posted as a follow-up to each of these messages by XL in order to avoi

[perl-python] string pattern matching

2005-02-01 Thread Xah Lee
s. So, essentially # you want to replace strings of the form # # img src="*.gif" # to # img src="*.png" # # Python provides string pattern matching by the # "re" module. (String Pattern Matching is # inanely known as Regular Expression (regex) in # the computing industry.