php - preg_match bbcode -
i have bbcode this
[caption=some text goes here]image.jpg[/caption] i'd use php's preg_match can value of image.jpg, regardless of what's next 'caption='. can me out?
raw regex:
]([^\]]+)[/caption] preg_match("]([^\]]+)[/caption]", mystring, $matches) image.jpg in first group. $matches[1] (i'm not escaped correctly in php).
Comments
Post a Comment