"Russ Cox" <[EMAIL PROTECTED]> wrote:
> What he meant is that if you have a regular expression of the form
> a{0,n} for any a, then you can replace that with a?a{0,n-1}, and
> similarly a{m,n} can be replaced with a{m-1,n-1}. This gives you
> an algorithm to convert a so-called intervalic regular expression
> into a standard Plan 9 regular expression.
>
> And awk does have standard Plan 9 regular expressions.
>
> Russ
Huh?
bash$ cat <<EOF | gawk -W re-interval '{gsub( "[lque]{2,3}", "*");print}'
> Some random text
> to hopefully clarify the question
> EOF
Some random text
to hopefu*y clarify the *stion
bash$
...Applying the suggested algorithm as I understand it:
term% cat <<EOF | awk '{gsub( "[lque]?[lque]{1,2}", "*");print}'
Some random text
to hopefully clarify the question
EOF
Some random text
to hopefully clarify the question
term%
-Derek