Quantcast
Channel: How to split a string at the first colon - Stack Overflow
Viewing all articles
Browse latest Browse all 3

How to split a string at the first colon

$
0
0
$str = "X-Storage-Url: https://pathofanapi";

I would like to split this into an array ("X-Storage-Url", "https://pathofanapi").

Could someone tell me the regex for this ? Regex has always been my weakness.

Thanks.


Viewing all articles
Browse latest Browse all 3

Latest Images

Trending Articles





Latest Images