A
A
alexfyodrv2018-02-21 23:22:58
Regular Expressions
alexfyodrv, 2018-02-21 23:22:58

How to make a regular expression "new line on a slash, excluding links"?

How to correctly compose a regular expression to split a string by a slash "/", but without affecting links, for example,
text1/ text2/ text3 / http://text4/ text5
convert a string to an array

[0 => 'text1', 1 => 'text2', 2=> 'text3', 3=> 'http://text4', 4 => 'text5']

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question