How can I extract this regular expression? String: AssemblycodeaaaaaaaaaaaaaaaaaaaaaaaoooooooooooooooooooooooStatus: x1Status: x23745Status: x3242Status: x how to extract this regular expression?
String:
Assembly code
aaaaaaaaaaaaaaaaaaaaaaaoooooooooooooooooooooooStatus: x1Status: x23745Status: x3242Status: x4bbbbbbbbbbbbbbbbbbbbbbbbcccccccccccccccccccccccc
Now extract Status: the following character
The number of Status lines is not fixed, sometimes one row, sometimes four rows
Now I can only get the value of the first line.
Preg_match_all ('# Status :(. *) Status: # isU', $ str, $ arr );
Echo $ arr [1] [0];
The second line does not know what to do.
------ Solution --------------------
PHP code
------ Solution --------------------
Preg_match_all ('# Status :(. *) \ n # isU', $ str, $ arr );
Print_r ($ arr [1]);
------ Solution --------------------
Preg_match_all ('# Status :(. *) # Mi', $ str, $ arr );
Print_r ($ arr [1]);
Array
(
[0] => x1
[1] => x23745
[2] => x3242
[3] => x4
)
------ Solution --------------------
/^ Status: \ s * (\ S *) \ s * $/im