What should be the RegEx if I want to find the text between the phrases " IF (NEW." and " !"?
Posted
by Parth
on Stack Overflow
See other posts from Stack Overflow
or by Parth
Published on 2010-03-29T05:06:21Z
Indexed on
2010/03/29
5:13 UTC
Read the original article
Hit count: 184
What should be the RegEx if I want to find the text between the phrases " IF (NEW.
" and " !
"?
Likewise I am thinking of the pattern as $pattern = '/(?<= IF (NEW.)[^ !]+/';
I am matching it as
$input = $row4['ACTION_STATEMENT'];
preg_match_all($pattern, $input, $captures);
What if I want $captures as an array, in which all values will be stored which will match with above pattern being in between of this pattern?
© Stack Overflow or respective owner