Closed reinyzni closed 9 months ago
If you remove the dot
in "'" < ([^'] .)* > "'"
it seems to work (it becomes "'" < [^']* > "'"
) .
Thank you @mingodadfor so quick response! Your solution works for me. I'm very appreciated for that! I should be more careful about regex expression next time.
Hi,
I have defined grammar as following:
and the following expression to parse:
if (xpath('/platform/port[@key]/breakout-mode/value') ~ 'none') then (must(exists(xpath_key_based('/interface/gigabit-ethernet[@key]', '/platform/port[@key]')) = false))
For the above expression I got the following error:1:137 syntax error, unexpected '/', expecting <String>, ','.
But if I add leading character '/' on the beginning of the string '/interface/gigabit-ethernet[@key]', the expression is able to pass successfully:if (xpath('/platform/port[@key]/breakout-mode/value') ~ 'none') then (must(exists(xpath_key_based('//interface/gigabit-ethernet[@key]', '/platform/port[@key]')) = false))
Can someone help me to fix my grammar to avoid adding leading character "/" to my string?Cheers!