You are viewing limited content. For full access, please sign in.

Question

Question

Quick Fields - Separate multiple RegEx capture groups with a space?

asked on October 23, 2014

I'm using a RegEx to capture two lines of text from a single Zone OCR area.  The RegEx returns both pieces of data, but it is combining them together without a space between them (see screenshot with Result Value).

I'd prefer to have the two lines combined into one line, but with the values separated by a space character. The reason for needing one line is that the target field is not a multi-value field.

 

The QF license doesn't have Pattern Matching or any advanced features.

Thanks!

QF Separate mulitple line values with a space.png
0 0

Answer

SELECTED ANSWER
replied on October 24, 2014

best idea would be to separate that regEx into two, and have the first one capture the first part, then at the linebreak, put a space and then put the token and the second part of the regEx in so you get what you need. That's probably the best way to handle it without Pattern Matching or other advanced features.

1 0
replied on October 24, 2014

Here's a different approach you might try - sometimes when I run into this situation I pass the entire token to workflow, then use workflow to break apart the address. This way you can use the pattern matching inside workflow to break things apart. 

 

This might be especially helpful if the address block you are pulling sometimes has three rows of data instead of two. 

replied on October 24, 2014

HI Ken,

I think I'm capturing the 2nd value after the line break by using the "\r*\n*" followed by the second capture group.

 

I'm not sure how or where I would create a second RegEx. Could you explain a bit further?

 

Thanks!

0 0

Replies

replied on October 24, 2014

Here's a different approach you might try - sometimes when I run into this situation I pass the entire token to workflow, then use workflow to break apart the address. This way you can use the pattern matching inside workflow to break things apart. 

 

This might be especially helpful if the address block you are pulling sometimes has three rows of data instead of two. 

0 0
You are not allowed to follow up in this post.

Sign in to reply to this post.