Stephen Turner wrote:

> Peter Love wrote:
> >
> > In this case I can split it into 5 separate REGEXPs, but others might
> > come up in the future.  In the future, could the whole REGEXP be
> > enclosed in quotes or something like that?
> >
>
> And Jeremy Wadsack wrote:
> > How about enclosing it in slashes, a la` Perl. Instead of
> >
> >     USERINCLUDE REGEXP:sret\d,pklove
> >
> > use
> >
> >     USERINCLUDE /sret\d/,/pklove/
>
> I agree something needs to be done. So let's think what.
>
> First, slashes are definitely out. Consider
>   FILEINCLUDE /~sret1/
> I suppose
>   FILEINCLUDE REGEXP:/~sret1/
> would work, but it still doesn't mean what you expect it to mean.

Good point. As with Perl, you'd end up having to use a lot of escape
characters.


> Quotes seem better. It is theoretically possible that a REGEXP might
> genuinely begin with a quote, which would mess things up. But it doesn't
> seem all that likely. Less likely than wanting a comma, anyway. :)

Or you couls allow any delimiter (somewhat like the rest of the configuration
command) as long as the end delimiter matches (or compliments) the start one:

  USERINCLUDE "user\d","sret\d"
  USERINCLUDE {user\d},{sret\d}
  USERINCLUDE #user\d#,#sret\d#

 or

  USERINCLUDE REGEXP:"user\d","sret\d"
  USERINCLUDE REGEXP:{user\d},{sret\d}
  USERINCLUDE REGEXP:#user\d#,#sret\d#


> Another option, which would be completely unambiguous, would be to require
> REGEXP:s to continue to the end of the line. So
>   USERINCLUDE REGEXP:user\d,REGEXP:sret\d
> would then have to be spelled out as
>   USERINCLUDE REGEXP:user\d
>   USERINCLUDE REGEXP:sret\d
>
> Anyone have any views on which solution is best -- or another better
> solution?

I thought about this, but that would make me think that you could combine
REGEXP and non-REGEXP on a single line, thus:

    USERINCLUDE REGEXP:sret\d,pklove

(with the second being a standard match), which brings you back to the
original problem. Of course the docs could explicitly state that a line must
contain all REGEXP or all non-REGEXP commands, but nobody reads documentation.
:-)


Jeremy Wadsack
Wadsack-Allen Digital Group


------------------------------------------------------------------------
This is the analog-help mailing list. To unsubscribe from this
mailing list, send mail to [EMAIL PROTECTED]
with "unsubscribe" in the main BODY OF THE MESSAGE.
List archived at http://www.mail-archive.com/[email protected]/
------------------------------------------------------------------------

Reply via email to