<div dir="ltr">Note that the Quote module has online documentation:<div><br></div><div><a href="http://augeas.net/docs/references/lenses/files/quote-aug.html">http://augeas.net/docs/references/lenses/files/quote-aug.html</a><br>
</div><div><br></div><div>and unit tests which provide great examples:</div><div><br></div><div><a href="http://augeas.net/docs/references/lenses/files/tests/test_quote-aug.html">http://augeas.net/docs/references/lenses/files/tests/test_quote-aug.html</a><br>
</div></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Fri, Jan 10, 2014 at 7:44 PM, Raphaël Pinson <span dir="ltr"><<a href="mailto:raphael.pinson@camptocamp.com" target="_blank">raphael.pinson@camptocamp.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div class="gmail_extra"><div class="gmail_quote"><div class="im">On Fri, Jan 10, 2014 at 3:59 PM, Tim Brigham <span dir="ltr"><<a href="mailto:timbrigham@gmail.com" target="_blank">timbrigham@gmail.com</a>></span> wrote:<br>

<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">

<div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">
<p dir="ltr">>> I wanted to ask about how I'm handling one point in writing the lens for parsing my NASL files. <br>>><br>>> I'm using two cases for my end of line, those that end with a semicolon only and those that end with a closing parenthesis. e.g.<br>


>><br>>> let cparen      = del /\)/ ")"</p>
<p dir="ltr">>This is actually Util.del_str ")"</p></blockquote></div><div><span style="font-family:arial,sans-serif;font-size:13px">I'm aware that I duplicated the functionality of a couple of the Util.* statements. I was debugging some issues with my regexes and it was easier to have the exact values displayed on screen. </span> I'll get them converted back over to Util. statements eventually. :)</div>

<div>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">
<p dir="ltr">>> let semic       = Util.del_str ";"<br>>> let dquote      = Util.del_str "\""</p>
<p dir="ltr">>It is better now to rely on the Quote module for safe/ automatic quote management.</p></blockquote></div><div>Can you please provide an example for this?  I've seen the quote module before don't have any experience with it. </div>

</div></div></div></blockquote><div><br></div></div><div>Sure. Here is your text parsed:</div><div><br></div><div><div>let entry =</div><div>  [ key Rx.word . Util.del_str "("</div><div>  . Quote.double</div><div>
  . Util.del_str ");" . Util.eol ]</div>
<div><br></div><div>test entry get "script_copyright(\"This script is Copyright (C) 2004 Michel Arboi\");\n" = ?</div></div><div><br></div><div>$ augparse test.aug </div><div>Test result: test.aug:8.0-.92:</div>

<div>  { "script_copyright" = "This script is Copyright (C) 2004 Michel Arboi" }</div><div><br></div><div>Would that do?</div><span class="HOEnZb"><font color="#888888"><div><br></div><div><br></div></font></span></div>
<span class="HOEnZb"><font color="#888888">-- <br><div dir="ltr">Raphaël Pinson<div>
Infrastructure Developer & Trainer</div><div><a href="tel:%2B33%20479%2026%2057%2093" value="+33479265793" target="_blank">+33 479 26 57 93</a><div><a href="tel:%2B33%20781%2090%2000%2079" value="+33781900079" target="_blank">+33 781 90 00 79</a></div>
<div><br></div><div>Camptocamp France<br>
Savoie Technolac<br>
BP 352<br>
48, avenue du Lac du Bourget<br>
73372 Le Bourget du Lac, Cedex<br>
<a href="http://www.camptocamp.com" target="_blank">www.camptocamp.com</a><br>
</div></div></div>
</font></span></div></div>
</blockquote></div><br><br clear="all"><div><br></div>-- <br><div dir="ltr">Raphaël Pinson<div>Infrastructure Developer & Trainer</div><div>+33 479 26 57 93<div>+33 781 90 00 79</div><div><br></div><div>Camptocamp France<br>

Savoie Technolac<br>
BP 352<br>
48, avenue du Lac du Bourget<br>
73372 Le Bourget du Lac, Cedex<br>
<a href="http://www.camptocamp.com" target="_blank">www.camptocamp.com</a><br>
</div></div></div>
</div>