Adding variables in regex patterns??
Posted: Sun Mar 12, 2006 6:48 am
Is it possible to pass variables into regex patterns?
Ive thought about this...
Would this work, or is there another way?
Thanks
Ive thought about this...
Code: Select all
$variable = 1234;
.
.
.
preg_match( "#\s\w...\s*"$variable"\s*...#"...)
.
.
.Thanks