Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
Message from discussion regular expression : the dollar sign ($) work with re.match() or re.search()
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
Alister  
View profile  
 More options Sep 26 2012, 11:47 am
Newsgroups: comp.lang.python
From: Alister <alister.w...@ntlworld.com>
Date: Wed, 26 Sep 2012 15:47:46 GMT
Local: Wed, Sep 26 2012 11:47 am
Subject: Re: regular expression : the dollar sign ($) work with re.match() or re.search()

On Wed, 26 Sep 2012 10:48:00 +0300, Jussi Piitulainen wrote:
> iMath writes:

>> I only know the dollar sign ($) will match a pattern from the end of a
>> string, but which method does it work with, re.match() or re.search()

> It works with both. With re.match, the pattern has to match at the start
> of the string _and_ the $ has to match the end of the string (or a
> line); re.search scans the string until it finds a suitable start.

> What was the weird character that you used as a question mark? I removed
> them because they confuse the newsreader I use.

It shows fine in my news reader, perhaps you should consider changing to
one that works properly (btw I am using pan on a fedora 17 netbook)

--
Q: Why is Microsoft's Product Support a failure?
A: Because Microsoft needs a Support Group instead.


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.