waickw Posted July 15, 2015 Share Posted July 15, 2015 I wanna to preg match and get the value in the middle ( http://google.com/xx.JPG, http://google.com/yy.JPG) this is the string ,"large":"[http://google.com/xx.JPG, http://google.com/yy.JPG", Thanks Quote Link to comment https://forums.phpfreaks.com/topic/297308-help-on-preg_match/ Share on other sites More sharing options...
scootstah Posted July 15, 2015 Share Posted July 15, 2015 The value in the middle of what? What is the desired output from your example input? Quote Link to comment https://forums.phpfreaks.com/topic/297308-help-on-preg_match/#findComment-1516412 Share on other sites More sharing options...
Ch0cu3r Posted July 15, 2015 Share Posted July 15, 2015 Hard to tell from that snippet of text you posted but it looks like that is part of a json encoded string? In which case you do not need to use regex. First decode the json buy using json_decode, then pass the urls to pathinfo and use the PATHINFO_FILENAME flag. Quote Link to comment https://forums.phpfreaks.com/topic/297308-help-on-preg_match/#findComment-1516413 Share on other sites More sharing options...
waickw Posted July 15, 2015 Author Share Posted July 15, 2015 thanks. i am using json_decode to solve already. thanks Quote Link to comment https://forums.phpfreaks.com/topic/297308-help-on-preg_match/#findComment-1516416 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.