On Wed, Jul 24, 2019 at 10:11 PM Adam Takahashi <attakahash...@gmail.com> wrote: > > I currently have a regex in PCRE that is > > (.|\r|\n)*?(?=FOO) > > It reads in a random number of multiple lines of sentences, and stops when it > sees the word FOO in all caps. I am have problems converting this to a valid > RE2 expression. > Any advice would help. Thanks.
The Go regexp library does not support (?=xxx). It would be trivial to write this regexp as a loop that reads a series of lines and stops when it finds a line containing FOO. See https://commandcenter.blogspot.com/2011/08/regular-expressions-in-lexing-and.html . Ian -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/golang-nuts/CAOyqgcVAptac48ueG6R%2BZgDGCO0jpQuT9zmKKiKgho6fsRZ3gw%40mail.gmail.com.