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

Popular posts from this blog

jquery - Invalid Assignment Left-Hand Side -

java - Play! framework 2.0: How to display multiple image? -

gmail - Is there any documentation for read-only access to the Google Contacts API? -