K
K
Konstantin Teploukhov2020-05-02 12:50:06
PHP
Konstantin Teploukhov, 2020-05-02 12:50:06

What is the mask for parsing this word?

There is a tag Trying to get the word DECLINED like this
<OrderStatus>DECLINED<\/OrderStatus>

preg_match_all('#<OrderStatus>(.+?)<\/OrderStatus>#su', $html, $arr); // OrderStatus
  var_dump($arr);

Does not exceed ...

Answer the question

In order to leave comments, you need to log in

1 answer(s)
D
Daria Motorina, 2020-05-02
@blood-moon

<OrderStatus>(.+?)<\\\/OrderStatus>
https://www.phpliveregex.com/p/vMV
The correct approach in such tasks is to use PHP functionality to work with the DOM tree

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question