I've read multiple tutorials on regex but it just won't stick in my head. I can never get my patterns to work. Hope someone can help.
I have a php variable ($content) where I need to find a certain pattern that looks like this
[gallery::name/of/the/folder/]
I would like to search:
- starting with "[gallery::"
- any other character (variable length)
- ending with "]"
So far, in PHP I have:
preg_match('/\[gallery\:/', $content, $matches, PREG_OFFSET_CAPTURE);
I can find [gallery: but that's it. I would like to be able to find the rest (:name/of/the/folder/])
Any help is appreciated! Thanks!