regex - i want to build regular expression to extract substring from string in php
I have a string like this:
"date created:12 march 1996phone:33444567Location:california steet 5"
location are fixed but their value is changing. I want to extract them from string and want to display them separate.
You can use
to split the string at the keywords:
This should do it...
This uses named capturing groups so you can access the data with...
See it on ideone.com