Top "Preg-match" questions

Regular expression pattern matching function for the PHP programming language

PHP is_numeric or preg_match 0-9 validation

This isn't a big issue for me (as far as I'm aware), it's more of something that's interested me. But …

php validation preg-match isnumeric
PHP - regex to allow letters and numbers only

I have tried: preg_match("/^[a-zA-Z0-9]", $value) but im doing something wrong i guess.

php regex preg-match
Delimiter must not be alphanumeric or backslash and preg_match

I have this code : $string1 = "My name is 'Kate' and im fine"; $pattern = "My name is '(.*)' and im …

php regex preg-match
How to search in an array with preg_match?

How do I search in an array with preg_match? Example: <?php if( preg_match( '/(my\n+string\…

php regex arrays preg-match
PHP regular expressions: No ending delimiter '^' found in

I've been having some trouble with regular expressions. This is my code $pattern = "^([0-9]+)$"; if (preg_match($pattern, $input)) echo "…

php regex preg-match pcre
Regex: Specify "space or start of string" and "space or end of string"

Imagine you are trying to pattern match "stackoverflow". You want the following: this is stackoverflow and it rocks [MATCH] stackoverflow …

regex preg-match
PHP preg_match - only allow alphanumeric strings and - _ characters

I need the regex to check if a string only contains numbers, letters, hyphens or underscore $string1 = "This is a …

php regex preg-match
Regular expression containing one word or another

I need to create an expression matching a whole number followed by either "seconds" or ""minutes" I tried this expression: ([0…

regex preg-match
Preg match text in php between html tags

Hello I would like to use preg_match in PHP to parse the "Desired text" out of the following from …

php parsing preg-match
How do I use preg_match to test for spaces?

How would I use the PHP function preg_match() to test a string to see if any spaces exist? Example "…

php regex preg-match