ASPN ActiveState Programmer Network
ActiveState
/ Home / Perl / PHP / Python / Tcl / XSLT /
/ Safari / My ASPN /
Cookbooks | Documentation | Mailing Lists | Modules | News Feeds | Products | User Groups


Recent Messages
List Archives
About the List
List Leaders
Subscription Options

View Subscriptions
Help

View by Topic
ActiveState
.NET Framework
Open Source
Perl
PHP
Python
Tcl
Web Services
XML & XSLT

View by Category
Database
General
SOAP
System Administration
Tools
User Interfaces
Web Programming
XML Programming


MyASPN >> Mail Archive >> pythoncard
pythoncard
RE: [Pythoncard-users] regular expressions in Python
by Kevin Altis other posts by this author
Jul 8 2002 6:18PM messages near this date
Re: [Pythoncard-users] regular expressions in Python | RE: [Pythoncard-users] regular expressions in Python
>  From: Magnus Lie Hetland [mailto:magnus@[...].org]
> 
>  Kevin Altis <altis@[...].com>:
>  >
>  > I started looking into the use of a regular expression for the
>  "Match whole
>  > words only" requirement for the Find and Replace dialogs. I
>  thought I would
>  > go ahead and list the resources I've found so far in case
>  anyone else dives
>  > into this. It doesn't appear that I can't simply use a word
>  boundary check
>  > \b pattern, so a more complex search is required. I may go
>  ahead and post to
>  > comp.lang.python since a Google groups search didn't turn up an answer.
> 
>  Hm. Can't you just use string.letters in a character class and do a
>  greedy search with a negative lookback? I don't see how that could
>  fail...
> 
>  (And why can't you rely on \b?)

Because I stupidly forgot to put an r in front of the '\b' so it got treated
as a backspace instead of a \b directive to the regular expression.

http://py-howto.sourceforge.net/regex/node13.html

Which of course I saw as soon as I posted the last message. \b looks like it
will probably work, testing it now.

ka



-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Oh, it's good to be a geek.
http://thinkgeek.com/sf
_______________________________________________
Pythoncard-users mailing list
Pythoncard-users@[...].net
https://lists.sourceforge.net/lists/listinfo/pythoncard-users
Thread:
Kevin Altis
Magnus Lie Hetland
Kevin Altis
Kevin Altis

Privacy Policy | Email Opt-out | Feedback | Syndication
© ActiveState Software Inc. All rights reserved