I need a regex to verify if the textarea has one of the following matches:
[img]https://example.com/image.jpg[/img]
[img=https://example.com/image.jpg]
This is what I've been trying so far, but it doesn't work, sadly...
/\[img(?=|\])(https?:\/\/(www\.)?[-a-zA-Z0-9@:%._\+~#=]{1,256}\.[a-zA-Z0-9()]{1,6}\b([-a-zA-Z0-9()@:%_\+.~#?&//=]*))(?\])(?\[\/img\])/gi
Thank you.