Home>

There is a line that contains the following text:

....... < strong > 1. < /strong > ...... ........ < strong > 2. < /strong >

I need to split a string into an array so that the delimiter is< strong > * Any number * [dot] < /strong >

I would be grateful for your help.

I'm not very good at regular expressions myself, I know that there is a functionpreg_split

php
  • Answer # 1

    something like this

    $ result= preg_split ('/&lt;
    (strong) &gt;
    \ d + \. &lt;
    \ /\ 1 &gt;
    /', $ txt);