Re: regex
| From: | Petar Nedyalkov | Date: | Thu, 05 May 2005 06:11:58 +0000 |
| Subject: | Re: regex | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-214488@lists.php.net to get a copy of this message | ||
On Wednesday 04 May 2005 21:31, Sebastian wrote:
> very new to regex
>
> i have a string with "bbcode" such as [img=XXX]
> (XXX being numeric)
>
> how do i search the string for the value of the bbcode and compare it to
> another variable?
> so i can take XXX and compare it to $image dynamically.
Try this regex:
/^img=(\d+)$/
>
> thanks for any help.
--
Cyberly yours,
Petar Nedyalkov
Devoted Orbitel Fan :-)
PGP ID: 7AE45436
PGP Public Key: http://bu.orbitel.bg/pgp/bu.asc
PGP Fingerprint: 7923 8D52 B145 02E8 6F63 8BDA 2D3F 7C0B 7AE4 5436
Attachment: [application/pgp-signature]
Attachment: [application/pgp-signature]