Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.php > #14627
| From | "Christoph M. Becker" <cmbecker69@arcor.de> |
|---|---|
| Newsgroups | comp.lang.php |
| Subject | Re: Regex to Match two letters |
| Date | 2014-11-25 19:08 +0100 |
| Organization | solani.org |
| Message-ID | <m52gj4$g7f$1@solani.org> (permalink) |
| References | <bd00054c-25fa-441a-a36a-56afa836cd12@googlegroups.com> |
Eric wrote:
> Completely new to this but the following REGEX to match only two
> letters fails.
>
> preg_match('/^[a-zA-Z]{2}$/','TZ');
>
> This returns false.
No. It returns 1, see <http://3v4l.org/gvUmD>.
--
Christoph M. Becker
Back to comp.lang.php | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
Regex to Match two letters Eric <ekoome@yahoo.com> - 2014-11-25 09:29 -0800
Re: Regex to Match two letters "Christoph M. Becker" <cmbecker69@arcor.de> - 2014-11-25 19:08 +0100
Re: Regex to Match two letters Eric <ekoome@yahoo.com> - 2014-11-25 10:53 -0800
Re: Regex to Match two letters "Christoph M. Becker" <cmbecker69@arcor.de> - 2014-11-25 20:07 +0100
Re: Regex to Match two letters Luuk <luuk@invalid.lan> - 2014-11-25 20:17 +0100
Re: Regex to Match two letters Lew Pitcher <lew.pitcher@digitalfreehold.ca> - 2014-11-25 14:17 -0500
Re: Regex to Match two letters "Christoph M. Becker" <cmbecker69@arcor.de> - 2014-11-25 20:35 +0100
Re: Regex to Match two letters Eric <ekoome@yahoo.com> - 2014-11-25 12:55 -0800
Re: Regex to Match two letters Luuk <luuk@invalid.lan> - 2014-11-26 10:12 +0100
Re: Regex to Match two letters Eric <ekoome@yahoo.com> - 2014-11-26 01:46 -0800
Re: Regex to Match two letters Arno Welzel <usenet@arnowelzel.de> - 2014-11-30 07:21 +0100
Re: Regex to Match two letters Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2014-11-30 13:07 +0100
Re: Regex to Match two letters Arno Welzel <usenet@arnowelzel.de> - 2014-11-30 19:47 +0100
Re: Regex to Match two letters Luuk <luuk@invalid.lan> - 2014-11-30 20:21 +0100
csiph-web