I wish to capture a random number of isbn numbers from an html string. One such string could be
978-2-7560<br />978-2-84055<br />978-2-84789<br />978-2-906187<br />
Ideally I would use one regex that would capture each repetition separately with preg_match_all. Of course I can capture the whole string like so:
(([\d-]{7,}<br />)+)
Then split it by
"<br />",
but I’d rather use only the one regex. Is that possible?
Best regards.
I believe this can’t be done. As an example, what I wanted to do was to capture array(a, a, a, a, a) from the string “aaaaa”, using a simple regex, with a random number of ‘a’s.
I will close it, sorry for the effort guys.