Dan Lowe wrote:
>
>On Jul 22, 2007, at 9:08 PM, Jason L wrote:
>
>> I don't know much about regex but in my subjects I need to match say
>>
>> BLAHBLAHBLAH  and anything after it  I tried BLAHBLAHBLAH* but it  
>> doesn't seem to work.
>
>"*" means "match 0 or more of the previous item". So in this case,  
>you are asking to match "BLAHBLAHBLA" followed by 0 or more of "H", e.g.
>
>BLAHBLAHBLA
>BLAHBLAHBLAH
>BLAHBLAHBLAHHHHHHHHH
>
>You probably want to try: BLAHBLAHBLAH.*
>
>"." means "anything", so ".*" means "0 or more of anything".


Correct. Don't confuse regexps with globbing. They aren't the same
thing. For Python regexps, see
<http://docs.python.org/lib/re-syntax.html>.

However, the 'regexp' you used should match, if anything, more than
what you want (i.e., it doesn't require the last character of
BLAHBLAHBLAH), so I suspect there is something else wrong. If you
could explain exactly what you're doing and what you're trying to
accomplish, perhaps we can figure out what that is.

-- 
Mark Sapiro <[EMAIL PROTECTED]>       The highway is for gamblers,
San Francisco Bay Area, California    better use your sense - B. Dylan

------------------------------------------------------
Mailman-Users mailing list
[email protected]
http://mail.python.org/mailman/listinfo/mailman-users
Mailman FAQ: http://www.python.org/cgi-bin/faqw-mm.py
Searchable Archives: http://www.mail-archive.com/mailman-users%40python.org/
Unsubscribe: 
http://mail.python.org/mailman/options/mailman-users/archive%40jab.org

Security Policy: 
http://www.python.org/cgi-bin/faqw-mm.py?req=show&amp;file=faq01.027.htp

Reply via email to