You can translate the question and the replies:

RegexExp to extract value between parentheses

I am trying to use the following formula to return the value that is between parentheses in a field. For some reason it is just returning the exact same value. I am pretty sure this REGEX is valid. regexp(bv_epic_tpi_inventory_report.hcco, '/\(([^)]+)\)/', '/\(([^)]+)\)/') Any suggestions to get this working? This is what one of the values looks like: YADAV, DEEPAK (deedee@company.com) and this is what I want returned deedee@company.com Is there another (easy) way to do this?
user
25-09-2020 11:52:39 -0400
code

1 Answer

Hi, The REGEXP function replaces each substring of the input string that matches the given regular expression, with the given replacement. Therefore you are simply replacing the matching conditions with the same one again. If you would like to get the email from the string, you might consider using SPLIT function to delimit the string by whitespace, and get the email from the array that is created from the SPLIT function. You can refer to the [Text Processing Functions](https://community.denodo.com/docs/html/browse/7.0/vdp/vql/appendix/syntax_of_condition_functions/text_processing_functions#split) section of the Virtual DataPort VQL Guide for more information. Hope this helps!
Denodo Team
28-09-2020 02:55:22 -0400
code
You must sign in to add an answer. If you do not have an account, you can register here