Find a Pattern across Multiple lines with R
I am trying to identify a pattern across multiple lines, to be exact 2 lines. Since the pattern in either individual line is not unique I am using this approach. So far I have tried to go with the function "grep" but I think I am missing the correct regular expression here. grep("^Item\\s{0,}2[^A]", f.text, ignore.case = TRUE) This part is a modified version of the edgar package function "getfillings" and tries to extract only the Management's Comment/Item 2 for quarterly results. If possible I would include something after ... 2[^A] in the function that reacts to the new line and then the str
0 upvotes
View original discussion ↗
Comments
Sign in or sign up to comment and upvote.
No comments yet.