[augeas-devel] Optional quotes with square lens

Raphaël Pinson raphael.pinson at camptocamp.com
Fri Oct 26 13:50:29 UTC 2012


Hello,


I'm trying to use the square lens to manage entries with optional quotes:

  let entry =
       let quote = del /"?/ "\""
    in let body = store /[^\n"]+/
    in let sto = square quote body quote
    in Build.key_value_line Rx.word Sep.space_equal sto


This works with quoted entries, but not with entries that don't have
quotes, such as:

  key = value


What am I doing wrong?



-- 
Raphaël Pinson
Administrateur Systèmes & Réseaux
Camptocamp France
Savoie Technolac
BP 352
48, avenue du Lac du Bourget
73372 Le Bourget du Lac, Cedex
www.camptocamp.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://listman.redhat.com/archives/augeas-devel/attachments/20121026/b4d19e81/attachment.htm>


More information about the augeas-devel mailing list