Ask Your Question

Capturing text within last parentheses group

asked 2018-10-24 11:36:43 -0500

gnixon gravatar image

updated 2018-10-26 12:12:03 -0500

jeff gravatar image

I have data like the following

Alexian Brothers Ambulatory Group Addison (ILARL)

I need to parse out the text between the ( ) and write it to a separate field. It cold be any number of characters. There could also be a second set of ( ) and I only need the ones at the end of the string.

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted

answered 2018-10-26 12:04:29 -0500

jeff gravatar image

The simplest way to accomplish this is probably via an expression evaluator, using the str:regExCapture EL function. For example, this should work (for the Field Expression):

${str:regExCapture(record:value('/text'), '.*\\((.*)\\)[^(]*$', 1)}

You can then store the result into a new field (Output Field) and use as needed.

edit flag offensive delete link more
Login/Signup to Answer

Question Tools



Asked: 2018-10-24 11:36:43 -0500

Seen: 72 times

Last updated: Oct 26 '18