I am using REGEXP_SUBSTR to select part of a string. The full string is either of the form
text (more_text (other_text)) or text (more_text (other_text)) (the difference here is the extra space before the beginning second bracket). The part of the string I want to collect in each case is 'more_text'.
I currently have the command
REGEXP_SUBSTR(string, '\((.*)\(', 1, 1, NULL, 1)
which works for the first format of string but doesn't return anything for the second. I'm unsure why the double space means it doesn't match. How can I change this to make it work in both cases?
EDIT: I realised that actually it isn't a double space it's a fullwidth parenthesis, which has the encoding %EF%BC%88. Is there a way of matching that character?
more_text(with additional spaces) in the second case dbfiddle.uk/lESCgWKH