By using db<>fiddle, you agree to license everything you submit by Creative Commons CC0.
REGEXP_REPLACE("[mention]987[/mention]", "^\[([^]]+)\]([^[]+)\[\/\1\]", "\2") |
---|
987 |
REGEXP_REPLACE("[mention]987[/mention]", "^\[([^]]+)\]([^[]+)\[\/\1\]", "\2") |
---|
987 |