Re: Error in RegExp ?

2002-02-24 Thread Thomas Hurst

* Rob Reid ([EMAIL PROTECTED]) wrote:

> At 2:35 PM EST on February 23 Thomas Hurst sent off:
> > Easy, just run it through something that gives more detailed errors:
> >
> > test.rb:2: invalid regular expression; there's no previous pattern,
> > to which '*' would define cardinality at 2:
>
> Can you tell us specifically what "something" is?

I used ruby there; C&P'd both regex's into a script and ran Ruby over
it.

ruby -e '//' would do just as well, as would perl -e or python.
I even remeber some Java text editor which had a regex testing plugin.

-- 
Thomas 'Freaky' Hurst  -  [EMAIL PROTECTED]  -  http://www.aagh.net/
-
Speak softly and carry a +6 two-handed sword.



Re: Error in RegExp ?

2002-02-23 Thread Knute

On Sat, 23 Feb 2002, Michael Seiwert wrote:

> Hi,
Hello

> mutt detects an error in one of the following lines but I can't find
> an error maybe you see the error.

> color body   green  black "((;|:|8\\:|\\=)(-|=|~|_|-'|%|<|)(\\)|Q|P|\\)%))"

> color body   redblack "(*)(ACK|ROTFL|LOL|SCNR|BRB|BTW|C|CWYL|FWIW|g|G|b
> g|vbg|GIWIST|G,D&R|HHOK|HTH|HTHBE|IMHO|IMNSHO|IOW|IRL|ITRW|OTP|OTF|OIC|OTOH|POV|RL|R
> TFM|ROTFL|TTFN|TTYL|U|WAEF|Y|TIMTOWTDI)(*)"

Don't you have to put a backslash (\) before the ampersand (&) and
possibly the comma so that they are literally those rather then special
characters.
The ampersand is a global reset command for the variables according to
the manual.

> The error message: Wrong RegExp in Line ... 



-- 
Knute

You live, You die.  Enjoy the interval!
-- Clarence



msg24734/pgp0.pgp
Description: PGP signature


Re: Error in RegExp ?

2002-02-23 Thread Cameron Simpson

On 15:56 23 Feb 2002, Rob Reid <[EMAIL PROTECTED]> wrote:
| At  2:35 PM EST on February 23 Thomas Hurst sent off:
| > Easy, just run it through something that gives more detailed errors:
| > 
| > test.rb:2: invalid regular expression; there's no previous pattern, to
| > which '*' would define cardinality at 2:
| 
| Can you tell us specifically what "something" is?

Hmm. Ruby? (Guessing from extension.) Perl might do well too:
Eg:
perl -e '/regexp-goes-here/'
and see if it explodes.
-- 
Cameron Simpson, DoD#743[EMAIL PROTECTED]http://www.zip.com.au/~cs/

What the hell, it's only 4 month's grant - I can live in a cardboard box, and
catch pigeons for food. After all, I've got raytracing to do!
- [EMAIL PROTECTED]



Re: Error in RegExp ?

2002-02-23 Thread Rob Reid

At  2:35 PM EST on February 23 Thomas Hurst sent off:
> * Michael Seiwert ([EMAIL PROTECTED]) wrote:
> > mutt detects an error in one of the following lines but I can't find
> > an error maybe you see the error.
> > 
> > color body   redblack "(*)(ACK|R...
> 
> Easy, just run it through something that gives more detailed errors:
> 
> test.rb:2: invalid regular expression; there's no previous pattern, to
> which '*' would define cardinality at 2:

Can you tell us specifically what "something" is?
Thanks.

-- 
Monosyllabic is not.
Robert I. Reid <[EMAIL PROTECTED]> http://astro.utoronto.ca/~reid/
PGP Key: http://astro.utoronto.ca/~reid/pgp.html



Re: Error in RegExp ?

2002-02-23 Thread Rob 'Feztaa' Park


--PNTmBPCT7hxwcZjr
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

Alas! Thomas Hurst spake thus:
> In other words, (*) is meaningless, since the * doesn't have anything to
> attach to (did you mean .* ?)

I think he meant "\*". As in, highlight any of those words, when it is
between two "*" symbols.

--=20
Rob 'Feztaa' Park
[EMAIL PROTECTED]
--
"Verbogeny is one of the pleasurettes of a creatific thinkerizer."
-- Peter da Silva

--PNTmBPCT7hxwcZjr
Content-Type: application/pgp-signature
Content-Disposition: inline

-BEGIN PGP SIGNATURE-
Version: GnuPG v1.0.6 (GNU/Linux)
Comment: For info see http://www.gnupg.org

iD8DBQE8d/0/PTh2iSBKeccRArZdAJ9pq2bor/CQpu9D+vWGEYHigQtUngCfYEPe
kiPQ3kJJlxDHURrZmbcRIfk=
=jU/n
-END PGP SIGNATURE-

--PNTmBPCT7hxwcZjr--



Re: Error in RegExp ?

2002-02-23 Thread parv

in message <[EMAIL PROTECTED]>, 
wrote Thomas Hurst thusly...
>
> * Michael Seiwert ([EMAIL PROTECTED]) wrote:
> 
> > Hi,
> > 
> > mutt detects an error in one of the following lines but I can't find
> > an error maybe you see the error.
> > 
> > color body   redblack "(*)(ACK|ROTFL|LOL|SCNR|BRB|BTW|C|CWYL|FWIW|g|G|b
> > 
>g|vbg|GIWIST|G,D&R|HHOK|HTH|HTHBE|IMHO|IMNSHO|IOW|IRL|ITRW|OTP|OTF|OIC|OTOH|POV|RL|R
> > TFM|ROTFL|TTFN|TTYL|U|WAEF|Y|TIMTOWTDI)(*)"
...
> 
> In other words, (*) is meaningless, since the * doesn't have anything to
> attach to (did you mean .* ?)

...as is the the ending (*), rather (.*), (meaningless) if you are
not going to use the saved value.  and, i don't think mutt has the
notion of matched/saved strings, at least, not in color context.

-- 
 



Re: Error in RegExp ?

2002-02-23 Thread Thomas Hurst

* Michael Seiwert ([EMAIL PROTECTED]) wrote:

> Hi,
> 
> mutt detects an error in one of the following lines but I can't find
> an error maybe you see the error.
> 
> color body   green  black "((;|:|8\\:|\\=)(-|=|~|_|-'|%|<|)(\\)|Q|P|\\)%))"
> 
> color body   redblack "(*)(ACK|ROTFL|LOL|SCNR|BRB|BTW|C|CWYL|FWIW|g|G|b
> g|vbg|GIWIST|G,D&R|HHOK|HTH|HTHBE|IMHO|IMNSHO|IOW|IRL|ITRW|OTP|OTF|OIC|OTOH|POV|RL|R
> TFM|ROTFL|TTFN|TTYL|U|WAEF|Y|TIMTOWTDI)(*)"

Easy, just run it through something that gives more detailed errors:

test.rb:2: invalid regular expression; there's no previous pattern, to
which '*' would define cardinality at 2: /(*)(ACK|ROTFL|LOL|SCNR|BRB
|BTW|C|CWYL|FWIW|g|G|bg|vbg|GIWIST|G,D&R|HHOK|HTH|HTHBE|IMHO|IMNSHO|
IOW|IRL|ITRW|OTP|OTF|OIC|OTOH|POV|RL|RTFM|ROTFL|TTFN|TTYL|U|WAEF|Y|T
IMTOWTDI)(*)/

In other words, (*) is meaningless, since the * doesn't have anything to
attach to (did you mean .* ?)

-- 
Thomas 'Freaky' Hurst  -  [EMAIL PROTECTED]  -  http://www.aagh.net/
-
If one cannot enjoy reading a book over and
over again, there is no use in reading it at all.
-- Oscar Wilde



Error in RegExp ?

2002-02-23 Thread Michael Seiwert

Hi,

mutt detects an error in one of the following lines but I can't find
an error maybe you see the error.

color body   green  black "((;|:|8\\:|\\=)(-|=|~|_|-'|%|<|)(\\)|Q|P|\\)%))"

color body   redblack "(*)(ACK|ROTFL|LOL|SCNR|BRB|BTW|C|CWYL|FWIW|g|G|b
g|vbg|GIWIST|G,D&R|HHOK|HTH|HTHBE|IMHO|IMNSHO|IOW|IRL|ITRW|OTP|OTF|OIC|OTOH|POV|RL|R
TFM|ROTFL|TTFN|TTYL|U|WAEF|Y|TIMTOWTDI)(*)"

The error message: Wrong RegExp in Line ... 

Regards

Michael