Re: Preg_match----------help
| From: | RaTT | Date: | Sat, 22 Jan 2005 12:36:49 +0000 |
| Subject: | Re: Preg_match----------help | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-207039@lists.php.net to get a copy of this message | ||
Hello,
This regular expresion should help you on your way
$regex = "/<[A-z_\-]+>?/";
HTH
Jarratt
On Sat, 22 Jan 2005 17:03:30 +0600, Chandana Bandara
<chandana@dialogsl.net> wrote:
> hi ,
>
> using preg_match , how can i match "<", "_" , ">" " -
> " such special characters in a sentence ???
>
> Eg:
>
> Strings are like this,
>
> 1.Ahgrwgsgd dfjb yuhh dfh <ABCD AFGHFDc GHJGKJ ------------------ here i want to match
> <ABCD
>
> 2.AFRYRGH vhGHJGB <ASD_ASD_DER> GHJGJ kjHGKJGK ---------- here i want to match
> <ASD_ASD_DER>
>
> 3.GHHTGH GHJK <BO-CA JKJ JLKL ---------------here i want to match <BO-CA
>
> what is the most suitable way to match those data ? plz guide me ,
>
> Thanx in advance,
> chandana
>
>