funstein Posted October 25, 2011 Share Posted October 25, 2011 Hello everyone, I am looking for a regex that will return any data that is enclosed with quote marks ("). So, when given this string : "String1" "String2" It should return an array that is 1 -> String1 and 2-> String2 Thanks.. Link to comment https://forums.phpfreaks.com/topic/249791-regex-matching-everything-between-two-s/ Share on other sites More sharing options...
requinix Posted October 25, 2011 Share Posted October 25, 2011 What have you tried so far? Link to comment https://forums.phpfreaks.com/topic/249791-regex-matching-everything-between-two-s/#findComment-1282145 Share on other sites More sharing options...
funstein Posted October 25, 2011 Author Share Posted October 25, 2011 I haven't actually found out anything but the fact that "." doesnt work. I am an alien to this, tbh. Link to comment https://forums.phpfreaks.com/topic/249791-regex-matching-everything-between-two-s/#findComment-1282151 Share on other sites More sharing options...
requinix Posted October 25, 2011 Share Posted October 25, 2011 Here is a good place to start. You'll be using a dot, a lazy star, and parentheses. [edit] Unless you need to deal with escaped quotes. That's trickier. Link to comment https://forums.phpfreaks.com/topic/249791-regex-matching-everything-between-two-s/#findComment-1282155 Share on other sites More sharing options...
funstein Posted October 25, 2011 Author Share Posted October 25, 2011 I have got to say, I understand nothing. Can you help a little more? Link to comment https://forums.phpfreaks.com/topic/249791-regex-matching-everything-between-two-s/#findComment-1282160 Share on other sites More sharing options...
xyph Posted October 25, 2011 Share Posted October 25, 2011 ... Are you even trying? It's hard to make it any more straightforward than that introduction has put it. What PART don't you understand? And if it really is all of it, I'm not sure you can be helped. Sorry. Link to comment https://forums.phpfreaks.com/topic/249791-regex-matching-everything-between-two-s/#findComment-1282173 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.