<?php $string = "Hello, my name is http://www.audio.com/1234.mp3/. Today is https://radio.org/weather.wav"; var_export( preg_split( '#\s*(https?://\S+(?<![,.]))\s*#', $string, flags: PREG_SPLIT_NO_EMPTY | PREG_SPLIT_DELIM_CAPTURE ) );
You have javascript disabled. You will not be able to edit any code.