How to get regex variables in PHP? asked Jul 24, 2020 in PHP by Pantycle_Genefanty (12.3k points) 0 like 0 dislike 36 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 regex variable php Your comment on this question: Your name to display (optional): Email me at this address if a comment is added after mine:Email me if a comment is added after mine 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. 1 Answer 0 like 0 dislike answered Jul 24, 2020 by Pantycle_Genefanty (12.3k points) Use preg_match_all function like it: $result = preg_match_all($pattern, $subject, $matches); var_dump($result); print_r($matches); Your comment on this answer: Your name to display (optional): Email me at this address if a comment is added after mine:Email me if a comment is added after mine 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.