Hey!
I am quite new to the whole Regex thing and tried to do a preg_match_all
in PHP which, kind of the results I wanted but the problem is it matches everything after what I actually wanted... like so:
String: This is something <code>Some code here</code> and more
Match from Regex: <code>Some code here</code> and more
Wanted match from Regex: <code>Some code here</code>
Here is my regular expression that I'm using:
/<code>(.*)<\/code>/
I think its something to do with the beginning and ending /
delimiters but I'm not entirely sure.
Any help would be appreciated, thanks!