Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #30226
| Path | csiph.com!newsfeed.hal-mli.net!feeder3.hal-mli.net!newsfeed.hal-mli.net!feeder1.hal-mli.net!newsfeed1.swip.net!newsfeed2.funet.fi!newsfeed3.funet.fi!newsfeeds.funet.fi!news.helsinki.fi!.POSTED!not-for-mail |
|---|---|
| From | Jussi Piitulainen <jpiitula@ling.helsinki.fi> |
| Newsgroups | comp.lang.python |
| Subject | Re: regular expression : the dollar sign ($) work with re.match() or re.search() |
| Date | 26 Sep 2012 19:29:51 +0300 |
| Organization | University of Helsinki |
| Lines | 38 |
| Sender | jpiitula@ruuvi.it.helsinki.fi |
| Message-ID | <qot7grgd9xc.fsf@ruuvi.it.helsinki.fi> (permalink) |
| References | <5d913584-b5ea-4ff1-8094-f4d5b273c0b6@googlegroups.com> <qotsja58btb.fsf@ruuvi.it.helsinki.fi> <CsF8s.157208$356.82477@fx07.am4> |
| NNTP-Posting-Host | ruuvi.it.helsinki.fi |
| Mime-Version | 1.0 |
| Content-Type | text/plain; charset=us-ascii |
| X-Trace | oravannahka.helsinki.fi 1348676991 13959 128.214.205.65 (26 Sep 2012 16:29:51 GMT) |
| X-Complaints-To | usenet@oravannahka.helsinki.fi |
| NNTP-Posting-Date | Wed, 26 Sep 2012 16:29:51 +0000 (UTC) |
| User-Agent | Gnus/5.09 (Gnus v5.9.0) Emacs/21.3 |
| Xref | csiph.com comp.lang.python:30226 |
Show key headers only | View raw
Alister writes:
> 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)
I was just curious why anyone would use anything other than the ASCII
question mark as an ordinary question mark when writing in English in
a newsgroup.
The post had this:
0000520 61 72 63 68 28 29 20 20 ef bc 9f 0a
a r c h ( ) sp sp o < us nl
od is showing (ef bc 9f) as (o < us) but since they are not individual
characters anyway, never mind that. Google tells me (ef bc 9f) is
UTF-8 for U+FF1F FULLWIDTH QUESTION MARK, so now I basically have my
answer as to what it is, though still not as to why one would use it.
The ordinary question mark would look like this:
0000000 61 72 63 68 28 29 20 3f 0a
a r c h ( ) sp ? nl
Back to comp.lang.python | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
regular expression : the dollar sign ($) work with re.match() or re.search() ? iMath <redstone-cold@163.com> - 2012-09-26 00:38 -0700
Re: regular expression : the dollar sign ($) work with re.match() or re.search() Jussi Piitulainen <jpiitula@ling.helsinki.fi> - 2012-09-26 10:48 +0300
Re: regular expression : the dollar sign ($) work with re.match() or re.search() Chris Angelico <rosuav@gmail.com> - 2012-09-26 17:57 +1000
Re: regular expression : the dollar sign ($) work with re.match() or re.search() Alister <alister.ware@ntlworld.com> - 2012-09-26 15:47 +0000
Re: regular expression : the dollar sign ($) work with re.match() or re.search() Jussi Piitulainen <jpiitula@ling.helsinki.fi> - 2012-09-26 19:29 +0300
Re: regular expression : the dollar sign ($) work with re.match() or re.search() ? Peter Otten <__peter__@web.de> - 2012-09-26 10:33 +0200
RE: regular expression : the dollar sign ($) work with re.match() or re.search() ? "Prasad, Ramit" <ramit.prasad@jpmorgan.com> - 2012-09-28 18:07 +0000
Re: regular expression : the dollar sign ($) work with re.match() or re.search() ? Ian Kelly <ian.g.kelly@gmail.com> - 2012-09-28 12:32 -0600
Re: regular expression : the dollar sign ($) work with re.match() or re.search() ? iMath <redstone-cold@163.com> - 2013-01-07 01:45 -0800
Re: regular expression : the dollar sign ($) work with re.match() or re.search() � Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2013-01-07 09:54 +0000
csiph-web