So for example I have the following column:
I need to have following column
I am using this query to extract what's between columns:
select substring(Column FROM '\((BR.+)\)')
FROM Table
but obviously it only works if there is one pair of brackets in a field and not two.
I am using Postgresql btw.
Thanks
This always extracts the last parenthesized expression:
substring(textcolumn FROM '\((BR[^)]+)\)[^(]*$')
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.