[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Groff] condition: OR of two string comparisons

From: Steffen Nurpmeso
Subject: Re: [Groff] condition: OR of two string comparisons
Date: Thu, 13 Nov 2014 14:38:50 +0100
User-agent: s-nail v14.7.8-70-g9310369

Tadziu Hoffmann <address@hidden> wrote:
 |>>> cannot handle regular expressions or kinda glob-ing as
 |>>> patterns?
 |> would be really cool to have.
 |Unfortunately, this also means inventing a new syntax.
 |How should "\*", "\(", and "\[" be treated -- as groff
 |escapes or as regular-expression magic?

Good question.
Ok i have no idea yet, but...  i mean if the feature is worth it
(and regular expression support for comparisons _is_ definitely
worth it inn my opinion) then of course it can be implemented :-}
Looking into do_if_request()... well the token would need
a special preprocessing phase that ensure that roff remains what
roff is.. hmm, sounds hairy at first glance.

Well.  Why not restricting this by saying that a new conditional
mode (don't nail me down onto it: .if @'LHS'RHS') is introduced
where RHS (or LHS) is _not_ subject to token processing, but
_only_ to regular expression matching, e.g.

  .ds idea La terre est femme
  .i[ef]re '\\*[idea]'^.*?terre.*' .tm cryptic cryptic tralla lalala

Anything speaking against such a construct?


reply via email to

[Prev in Thread] Current Thread [Next in Thread]