Good day! Using this one:
#\[img\]([^\/\\]*\.(jpg|jpeg|gif|png|bmp))\[/img\]#si
I wanna replace the text with this one:
<img src="$1"/>
The error is: Warning: preg_replace(): Compilation failed: missing terminating ] for character class
I have tested it on regex101.com, it works well in preg_match mode.
P.S. Is the first one safe enough? Thanks!