[Pyparsing] How do you look ahead to the next character?
Brought to you by:
ptmcg
From: Kenneth L. <ke...@lo...> - 2012-08-13 15:15:10
|
HI, I've got a grammar which checks a search query to see if it is valid. The problem is that the grammar is allowing through items like 'foo:bar' as 'foo AND bar' (implicit AND). Is there a way to check that a Regex has parsed the entire term, i.e. that the next char is a space or EOL, and fail if not? I've tried '(?=$|\s)' as a positive lookahead, but that always matches. ...Ken |