Fork me on GitHub
#instaparse
<
2016-04-11
>
conaw05:04:05

hey, anyone know how to match the \ character?

conaw05:04:31

I’m trying to match strings within a parsed file, something like this string = '\"' #'[^(?<!\\\)\"]* '\"'

conaw05:04:06

I keep getting either errors of unmatched parens, or instaparse errors when I’m doing

conaw06:04:22

figured it out

conaw06:04:45

If anyone’s interested

conaw06:04:52

string = '\"' (#'[^\"]' | '\\\\\"') '\"'

conaw06:04:12

I’m know there should be a way to do it with lookbehind inside the regex, but at least now I only have one problem

conaw06:04:54

Would be great to have an instaparse wiki for common grammars, if that doesn’t already exist somewhere

conaw06:04:43

also, would be great to know if anyone is using a combination of instaparse and any of the nlp libraries