I'm wondering if someone can help me? I am struggling to write regex to match the whole of the following shortcode:
[recipe_details_sc carbs='10g carbs' time='30 mins' serves='Serves 6']
I want to select the whole shortcode.
Thank you.
I'm wondering if someone can help me? I am struggling to write regex to match the whole of the following shortcode:
[recipe_details_sc carbs='10g carbs' time='30 mins' serves='Serves 6']
I want to select the whole shortcode.
Thank you.
Use the square brackets as boundaries, so that you search for
start-bracket ; not-bracket (many) ; end-bracket
The only pain being that
Both of which add up to making it difficult to read!
\[[^]]+\]
Tested using Regular Expression Test Page