Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.php > #9898
| Path | csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!us.feeder.erje.net!news2.arglkargh.de!noris.net!newsfeed.arcor.de!newsspool4.arcor-online.net!news.arcor.de.POSTED!not-for-mail |
|---|---|
| Content-Type | text/plain; charset="UTF-8" |
| Message-ID | <6604182.KQDD0VfRGQ@PointedEars.de> (permalink) |
| From | Thomas 'PointedEars' Lahn <PointedEars@web.de> |
| Reply-To | Thomas 'PointedEars' Lahn <php@PointedEars.de> |
| Organization | PointedEars Software (PES) |
| Date | Thu, 27 Jun 2013 01:18:01 +0200 |
| User-Agent | KNode/4.10.4 |
| Content-Transfer-Encoding | 8Bit |
| X-Face | %i>XG-yXR'\"2P/C_aO%~;2o~?g0pPKmbOw^=NT`tprDEf++D.m7"}HW6.#=U:?2GGctkL,f89@H46O$ASoW&?s}.k+&.<b';Md8`dH6iqhT)6C^.Px|[=M@7=Ik[_w<%n1Up"LPQNu2m8|L!/3iby{-]A+#YE}Kl{Cw$\U!kD%K}\2jz"QQP6Uqr],./"?;=4v |
| Face | iVBORw0KGgoAAAANSUhEUgAAADAAAAAwBAMAAAClLOS0AAAAGFBMVEXTxa4RFk5dUWANED8PFEfy7+MGBiW+n3ZNF/QuAAACaElEQVQ4jVXUwVOcMBQG8Dc7Rc4PUntdWV2uxjDpGaGeozOp1woar4jd5t/v9wLstMwsA/ntlxdCAgUc1hjTc9/JCZfGoo3wG3HdmdAWrIJRHe7GM/TmpY5VFefuVcAkkPbLIaN8rmPmjloyZxgyR3GuJ4K0AGtJ2htz8o7yqikm759fldQXaMpbDzjKAG+8v+AugVTOPO5DOjLvGtUYQwh0CPjnVMyGd+8/GfUB5nLKJDD2aLDh5HYyMDJGDwQIo2ZmZcKbowNmAdB/AzyFhrmF2MHRb0QJJfaAnwGB6orZhoykLzJtGwF/xpYxI1dswomiUj3gTuAIqCn/4C7cULwGNBtwMTk3Y4LfKB5YUaOKBKYtpplm7u0vip8tU1NWWyI/7XdcSuIDoMt6rVHMWT0DbjHPGqDqZVSa6zleLcUTcIKLoMv3ueJluALtAo9B302zPPlrtiVScRdCjXvVh3e3JpYa/jjkuC9N+LrBMlz/eAN4eQijX2EdLo6c5tGGHwLyHFtXk89dDGHwCVhG9T0S/j55AhRZgkMCmUQXJ49TnS1wnQDvw0eAh9ICeMmEFbCnPMFzjAvsWoEWEFdYEx+S0MoUZ1gT1wId8+AF3Bl2OoEu906AUHx5VLw/gXYg/x84loOah/2UYNrgiwSwGO7RfUzVBbx/kgpckumGOi6QirtD6gkLTitbnxNol47S2jVc2vsN5kPqaAHT8uUdAJM4v/DanjYOwmUjWznGfwB7sGtAtor5BgofDuzaRj4kSQAqDakTsKORa3Q3xKi3gE1fhl71KRMqrdZ2AWNNg/YOhQyrVBnb+i+nEg4bsDA+egAAAABJRU5ErkJggg== |
| Subject | Re: how to change old ereg? |
| Newsgroups | comp.lang.php |
| References | <f60593e2-b741-40ba-9355-dcbfd41ac386@googlegroups.com> <8e2894b4-16cf-4599-af33-391fc6570124@googlegroups.com> <kqekud$ap3$1@softins.clara.co.uk> <kqffdp$5s3$1@dont-email.me> |
| MIME-Version | 1.0 |
| Lines | 31 |
| NNTP-Posting-Date | 27 Jun 2013 01:18:03 CEST |
| NNTP-Posting-Host | 18a970a4.newsspool4.arcor-online.net |
| X-Trace | DXC=U@BSOj70P<aj5k5aEF7ISm4IUK<Cl32<a4Fo<]lROoRa8kF<OcfhCOklY=Qggn==WoDZm8W4\YJNlb@mF9jNikde7a5\<`>]gfnRPOOQ<\LbAn |
| X-Complaints-To | usenet-abuse@arcor.de |
| Xref | csiph.com comp.lang.php:9898 |
Show key headers only | View raw
Gregor Kofler wrote:
> Am 26.06.2013 13:57, Tony Mountifield meinte:
>> That's because you have an unescaped / within your regex, so it sees
>> /^M?(([0-9]?)[ ]?([0-9])(/ followed by a ? as a regex modifier.
>>
>> Try this:
>>
>> } elseif (preg_match('/^M?(([0-9]?)[ ]?([0-9])(\/?)([0-9]*))SM$/',
>
> Or use an (in this case) "unambigious" delimiter like '~', '#', etc.
The word you were looking for is “unambiguous”.
> http://php.net/manual/en/regexp.reference.delimiters.php
Or use
preg_match('/' . preg_quote('^M?((\d?) ?(\d)(/?)(\d*))SM$', '/') . '/', …
to be safe.
(There must be an error in the Matrix.)
PointedEars
--
Sometimes, what you learn is wrong. If those wrong ideas are close to the
root of the knowledge tree you build on a particular subject, pruning the
bad branches can sometimes cause the whole tree to collapse.
-- Mike Duffy in cljs, <news:Xns9FB6521286DB8invalidcom@94.75.214.39>
Back to comp.lang.php | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
how to change old ereg? astrid.kuhr@gmail.com - 2013-06-25 21:41 -0700
Re: how to change old ereg? Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2013-06-26 11:47 +0200
Re: how to change old ereg? Astrid <astrid.kuhr@gmail.com> - 2013-06-26 04:29 -0700
Re: how to change old ereg? tony@mountifield.org (Tony Mountifield) - 2013-06-26 11:57 +0000
Re: how to change old ereg? Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2013-06-26 14:13 +0200
PREG \d vs. [0-9] (was: how to change old ereg?) Christoph Michael Becker <cmbecker69@arcor.de> - 2013-06-26 16:42 +0200
Re: PREG \d vs. [0-9] Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2013-06-26 18:02 +0200
Re: how to change old ereg? Gregor Kofler <usenet@gregorkofler.com> - 2013-06-26 21:34 +0200
Re: how to change old ereg? Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2013-06-27 01:18 +0200
Re: how to change old ereg? The Natural Philosopher <tnp@invalid.invalid> - 2013-06-27 12:55 +0100
Re: how to change old ereg? Astrid <astrid.kuhr@gmail.com> - 2013-06-26 05:24 -0700
Re: how to change old ereg? Astrid <astrid.kuhr@gmail.com> - 2013-06-28 01:38 -0700
Re: how to change old ereg? tony@mountifield.org (Tony Mountifield) - 2013-06-28 09:02 +0000
Re: how to change old ereg? Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2013-06-28 12:39 +0200
Re: how to change old ereg? Denis McMahon <denismfmcmahon@gmail.com> - 2013-06-28 11:08 +0000
Re: how to change old ereg? Astrid <astrid.kuhr@gmail.com> - 2013-06-28 02:46 -0700
Re: how to change old ereg? Jerry Stuckle <jstucklex@attglobal.net> - 2013-06-28 08:48 -0400
csiph-web