Open nurdann opened 1 year ago
Can I use grammar to search for its occurrence in a text instead of matching the entire string?
e.g with following grammar
log = "(" userid "&" lat ")" userid = ~"user_?id=[0-9a-zA-Z]+" lat = "lat" delimeter float delimeter = "=" / ":" float = digits ("." digits)? digits = ~"[0-9]+"
I can match
(user_id=1000&lat=23.3)
Can I search for substring? e.g.
prefix (user_id=1000&lat=23.3)
And more complex: what if I want to search for key-value pairs, e.g. user_id, lat inside paranthesis? so I'd want to match the following strings as well,
user_id
lat
(... user_id=1000 .... lat=23.3 ...)
Would unwanted characters be part of the grammar as well?
Can I use grammar to search for its occurrence in a text instead of matching the entire string?
e.g with following grammar
I can match
Can I search for substring? e.g.
And more complex: what if I want to search for key-value pairs, e.g.
user_id
,lat
inside paranthesis? so I'd want to match the following strings as well,Would unwanted characters be part of the grammar as well?