Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.php > #14629

Re: Regex to Match two letters

Path csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!eu.feeder.erje.net!newsfeed.datemas.de!weretis.net!feeder1.news.weretis.net!news.solani.org!.POSTED!not-for-mail
From "Christoph M. Becker" <cmbecker69@arcor.de>
Newsgroups comp.lang.php
Subject Re: Regex to Match two letters
Date Tue, 25 Nov 2014 20:07:20 +0100
Organization solani.org
Lines 24
Message-ID <m52k13$t0d$1@solani.org> (permalink)
References <bd00054c-25fa-441a-a36a-56afa836cd12@googlegroups.com> <3b5e6178-0da6-4db5-becd-348c8d548b88@googlegroups.com>
Mime-Version 1.0
Content-Type text/plain; charset=windows-1252
Content-Transfer-Encoding 7bit
X-Trace solani.org 1416942435 29709 eJwFwQkBACAIA8BKIgxmHb7+EbyDuniFOdywWGfdrj5jvDB2pqrmWIkWM/HOxN0OWYJP8gMjYRE4 (25 Nov 2014 19:07:15 GMT)
X-Complaints-To abuse@news.solani.org
NNTP-Posting-Date Tue, 25 Nov 2014 19:07:15 +0000 (UTC)
User-Agent Mozilla/5.0 (Windows NT 6.1; WOW64; rv:31.0) Gecko/20100101 Thunderbird/31.2.0
X-User-ID eJwFwYEBwCAIA7CXQNqC50zE/09YwpCrE6LAxxeJxp5lxx3dnJpIA/CNBKxTm6q61n1tHn8JWBCn
In-Reply-To <3b5e6178-0da6-4db5-becd-348c8d548b88@googlegroups.com>
Cancel-Lock sha1:HS0D8Ygh60ihTRC1I9TrdM20mn8=
X-NNTP-Posting-Host eJwFwQkBACAIBLBK8h0SBxD6R3AzAaFdYVBb25wUcjVdDg8uz/b0nlsHECZ696EmNXrohHwbdBEC
Xref csiph.com comp.lang.php:14629

Show key headers only | View raw


Eric wrote:

> On Tuesday, November 25, 2014 5:30:00 PM UTC, 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.
> 
> This is returning false for me. Really strange. on php 5.4.16

Yes, that is really strange, because on <http://3v4l.org/n0lRc> it
returns 1 under PHP 5.4.16.  Do you have a custom build or a
non-standard PCRE version?

Please try to avoid the broken Google Groups for posting to Usenet
newsgroups.

-- 
Christoph M. Becker

Back to comp.lang.php | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


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