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

Question

Question

RegEx/Pattern Matching: Return content of lines above specified text

asked on June 3, 2021

Hi,

I'm trying to extract text using pattern matching. Using the below text as an example, I'm trying to return the content of whole lines above the "IND No." line (in the actual use case, a PDF file has individual lines fixed above "IND No." that must be captured).

Line 1
Line 2
Line 3
Line 4
Line 5
Line 6
IND No.
Line 7
Line 8
Line 9

The following Regex validates correctly using an online checker, but doesn't match anything in Workflow/Quick Fields. In this instance I would hope that it would return "Line 1".

([0-z ]{1,})\n[0-z ]{1,}\n[0-z ]{1,}\n[0-z ]{1,}\n[0-z ]{1,}\n[0-z ]{1,}\nIND No.

0 0

Answer

SELECTED ANSWER
replied on June 3, 2021

Lines in text pages in Laserfiche usually end in \r\n, not just \n. Also, I'm assuming you already turned off case sensitivity in Pattern Matching?

1 0
replied on June 7, 2021

Using  \r\n for the line breaks worked.

 

Thanks for the help!

0 0

Replies

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

Sign in to reply to this post.