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

Question

Question

Pattern matching a string after a word

asked on November 9, 2016

I need to capture a string after a word in the OCRed text. The string I am trying to capture is "Vendor Name" and it comes after "Vendor: ". I have trying using "(?<=Vendor:).*" to capture "Amazon Test" but it only captures "Amazon". I also tried "(?<=Vendor:)([^\n\r]*)" with the same result.

I tried testing both these on https://regex101.com/ and they both captured the full string. Can someone help as it appears this should work in LF but it's not.

0 0

Replies

replied on November 9, 2016

I found the issue, I did not realize that when you test a pattern LF applies the same test data to all the patterns however many you have. This is working now for me.

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

Sign in to reply to this post.