You can translate the question and the replies:

Extracting string between two identical charecters

Hi Team, I have a field which have sample data like /abc/data/source/AYZ/SrcFile/XYZ_ABC_1023456789^900061767ABC00100002^ABC_2019-10-15_00.00.51.62 I want to extract two id's 1023456789 and 900061767ABC00100002 ( which is between two chars '^' ) from above string. /abc/data/source/AYZ/SrcFile/XYZ_ABC_ is common in all records. Thanks
user
24-10-2019 09:16:54 -0400
code

1 Answer

Hi, I would recommend extracting the two numbers specified by you by using a combination of SPLIT and SUBSTRING functions provided by Denodo. You could use something like `split('\^', substring(A, 37)) ` where A is the field which has incoming values in the format */abc/data/source/AYZ/SrcFile/XYZABC*... This would result in an array with the split values and you can later operate on this array to extract your desired values. You can refer to [SPLIT]( https://community.denodo.com/docs/html/browse/7.0/vdp/vql/appendix/syntax_of_condition_functions/text_processing_functions#split) and [SUBSRTING]( https://community.denodo.com/docs/html/browse/7.0/vdp/vql/appendix/syntax_of_condition_functions/text_processing_functions#substring-substr) for more information. Hope this helps.
Denodo Team
28-10-2019 06:55:37 -0400
code
You must sign in to add an answer. If you do not have an account, you can register here