<div dir="ltr"><br><br><div class="gmail_quote">On Sun, Aug 21, 2011 at 00:45, C K Kashyap <span dir="ltr">&lt;<a href="mailto:ckkashyap@gmail.com">ckkashyap@gmail.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<div class="gmail_quote"><div class="im"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div class="gmail_quote"><div><br></div><div>Why not just go with anchorHead and anchorTail or similar?  And a capture could simply be</div>

<div><br></div></div></div></blockquote><div><br></div></div><div>Thanks for your inputs Brandon. I&#39;ve updated the code with anchors. Still trying to get a hold of captures.</div></div></blockquote><div><br></div><div>
What are you finding difficult about them?  Backreferences?  Given that this is Haskell, I&#39;d look for ways to &quot;tie the knot&quot;, although in terms of usability it&#39;s probably best to maintain a list of captures where the knot is actually tied between a capture regex component and its captures list entry, with backreferences either also tying the knot with the captures list or containing an offset in that list.  Practical usage:  you need to be able to access the strings matched by captures from &quot;outside&quot;, so you want an independent structure for those captures rather than having to gmap the regex tree to get the captured strings.</div>
</div><div><br></div>-- <br>brandon s allbery                                      <a href="mailto:allbery.b@gmail.com" target="_blank">allbery.b@gmail.com</a><br>wandering unix systems administrator (available)     (412) 475-9364 vm/sms<br>
<br>
</div>