I'm trying to clean shortcodes from a dynamic html code.
Here is the ruby regex so far: /(?:\[\/?)[^\/\]]+\/?\]/
It works great with all codes that close like this:
[vc_column]...[/vc_column]
But not with:
[vc_video link='https://vimeo.com/abc' align='center']
# In this case there is no [/vc_video]
Here is a permalink to rubular: http://rubular.com/r/5et0W0Q73A with vc_video
inside not matched.
Any idea? Thank you.