<div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote">2018-04-29 17:52 GMT+03:00 MRAB <span dir="ltr"><<a href="mailto:python@mrabarnett.plus.com" target="_blank">python@mrabarnett.plus.com</a>></span>:<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div class="gmail-HOEnZb"><div class="gmail-h5"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<br>
</blockquote></div></div>
How about these:<br>
<br>
local m1, m2:<br>
m1 = regexp1.match(line)<br>
m2 = regexp2.match(line):<br>
if m1 and m2:<br>
...<br></blockquote><div><br></div><div>Is it possible to do the same thing, but with the help of `with` statement:</div><div><br></div><div><font face="monospace, monospace">with local('m1', 'm2'):</font></div></div></div><blockquote style="margin:0 0 0 40px;border:none;padding:0px"><div class="gmail_extra"><div class="gmail_quote"><div><font face="monospace, monospace">m1 = regex1.match(line)</font></div></div></div><div class="gmail_extra"><div class="gmail_quote"><div><font face="monospace, monospace"><span style="color:rgb(34,34,34);font-size:small;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-weight:400;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline">m2 = regex2.match(line)</span>
</font></div></div></div><div class="gmail_extra"><div class="gmail_quote"><div><font face="monospace, monospace">if m1 and m2:</font></div></div></div></blockquote><blockquote style="margin:0 0 0 40px;border:none;padding:0px"><blockquote style="margin:0 0 0 40px;border:none;padding:0px"><div class="gmail_extra"><div class="gmail_quote"><div><font face="monospace, monospace">...</font></div></div></div></blockquote></blockquote><div class="gmail_extra"><div class="gmail_quote"><div> </div><div>With kind regards,</div><div>-gdg</div></div><br></div></div>