in PHP by (11.1k points)
0 like 0 dislike
21 views

Me need in string find all regular expression pattern variables on PHP? How do it? Do use preg_match? How I can to get regular expression variables in PHP?


php get regex variable

1 Answer

0 like 0 dislike
by (11.1k points)

Use preg_match_all function like it:

$result = preg_match_all($pattern, $subject, $matches);
var_dump($result);
print_r($matches);

Your answer

Try to answer the question as detailed as possible.
Your name to display (optional):
Privacy: Your email address will only be used for sending these notifications.
Anti-spam verification:
To avoid this verification in future, please log in or register.