I don't know if this is enough data to feed off of, but I have
preg_match('/SAMPLETEXT/', $bcurl, $cookie1);
and I was wondering if I can make it
preg_match($newfunction, $bcurl, $cookie1);
but when I do, I get this error "Warning: preg_match() [function.preg-match]: Delimiter must not be alphanumeric or backslash in".
How can I make it check for my new function, rather than have it check just for "SAMPLETEXT".
Try preg_match("/$newfunction/", $bcurl, $cookie1);
so that you are providing the required delimiters (using a delimiter that isn't going to be in $newfunction).
But note that the documentation says "Do not use preg_match() if you only want to check if one string is contained in another string. Use strpos() or strstr() instead as they will be faster."
preg_match('/'.$pattern.'/i', $subject)
i
option: allow capital letters or hyphen.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With