Answer the question
In order to leave comments, you need to log in
How to make a regular expression for two strings?
There are two lines with a break:
Первая строка<br>
вторая строка
$input_line = "Первая строка<br>вторая строка";
preg_match("/(^.*<br>$)(.*)/m", $input_line, $output_array);
array(3
0 => Первая строка<br>
1 => Первая строка<br>
2 =>
)
Answer the question
In order to leave comments, you need to log in
Looks like this solution:
reg_grep("/(^.*$)/m", explode("\n", $input_lines));
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question