<p dir="ltr"><br>
On Mar 28, 2016 3:01 PM, "Olly Betts" <<a href="mailto:olly@survex.com">olly@survex.com</a>> wrote:<br>
> That's where a new command needs to be hooked up, but in this case I'd<br>
> put the actual implementation into transform.cc alongside the<br>
> implementation of $transform - then it can share $transform's regex<br>
> cache (which avoids recompiling a regex if it's used multiple times,<br>
> either explicitly or in something like $hitlist which gets evaluated<br>
> multiple times).<br>
><br>
Yes, that would be a much better way of hooking up the function since the regex cache doesn't need to be created again.</p>
<p dir="ltr">> It would be useful to also support an optional flags argument, like<br>
> $transform does.  Then the user can do things like a case insensitive<br>
> match.<br>
><br>
Oh yes I'm sorry I forgot to mention this.<br>
We can use the options provided by the pcre library to let the user modify functionality accordingly.</p>
<p dir="ltr">> Isn't that backwards?<br>
><br>
That's the way I thought it could be done looking at the way $transform has been written. If there is any other way, do guide me through that.</p>
<p dir="ltr">Can I start with trying to implement this?</p>