Perl Error

2008-11-30 Thread Meghanand Acharekar
Hi, While running following IMAP learn script (see attachment) I am getting following error message. config: invalid regexp for rule OEM_SPAM: /Reinstall OEM with different > media???/i: Nested quantifiers in regex; marked by <-- HERE in > m/(?i)Reinstall OEM with different media??? <-- HERE / >

Re: How to match HTML tag with RegExp

2008-11-30 Thread Stealth
On Sunday 30 November 2008 09:29:58 pm Raymond Wan wrote: > "If you can't say anything nice, don't say > anything at all". The whole world could use this one and should. -- Stealth -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http://learn.perl

Re: help with subroutines and reading/writing to file

2008-11-30 Thread John W. Krahn
blake askew wrote: I am new to perl and attempting to write a script that will do a reverse dns lookup on an ip, store this result into a file, then read the file in order to do a whois lookup. The whois lookup answer should also be written to a seperate file. I have the reverse dns lookup workin

Re: How to match HTML tag with RegExp

2008-11-30 Thread Raymond Wan
Jenda Krynicky wrote: From: Canol Gökel <[EMAIL PROTECTED]> I can't quote the last reply, I guess I have a problem with my newsreader. But you even call me stupid. I heard before that Perl community is rude, and now I experienced it myself. I guess Perl community deserves the reputation of b

Re: How to match HTML tag with RegExp

2008-11-30 Thread Mr. Shawn H. Corey
On Mon, 2008-12-01 at 02:57 +0100, Jenda Krynicky wrote: > OTOH, he can match the innermost [block]...[/block], remove it or > replace by something that doesn't contain either "tag", match the > next one ... It would not be pretty, but it would be doable. > > And actually if there really is jus

Re: How to match HTML tag with RegExp

2008-11-30 Thread Jenda Krynicky
From: "Mr. Shawn H. Corey" <[EMAIL PROTECTED]> > On Sat, 2008-11-29 at 20:56 -0800, ZuLuu wrote: > > How can I match structures like > > this: > > > > [block] > > this is a block > > [block] > > this is another block > > [/block] > > first block

Re: How to match HTML tag with RegExp

2008-11-30 Thread Jenda Krynicky
From: Canol Gökel <[EMAIL PROTECTED]> > On Sat, 29 Nov 2008 21:19:01 -0500 > [EMAIL PROTECTED] ("Chas. Owens") wrote: > > > And yes, asking about what variables are on a different languages list > > is foolish. For instance, Perl's variables are dynamic and loosely > > typed, whereas Pascals are s

Re: How to match HTML tag with RegExp

2008-11-30 Thread Jenda Krynicky
From: Canol Gökel <[EMAIL PROTECTED]> > Thanks people I already got the answer from somewhereelse. And was it an answer to the question you posted here? I doubt it. > > I can't quote the last reply, I guess I have a problem with my newsreader. > But you even call me stupid. I heard before that Per

help with subroutines and reading/writing to file

2008-11-30 Thread blake askew
I am new to perl and attempting to write a script that will do a reverse dns lookup on an ip, store this result into a file, then read the file in order to do a whois lookup. The whois lookup answer should also be written to a seperate file. I have the reverse dns lookup working, but when I also ca

Re: Matching HTML tags with RegExp

2008-11-30 Thread Mr. Shawn H. Corey
On Sun, 2008-11-30 at 02:51 +0200, Canol Gökel wrote: > How can one write an expression to match always the most inner part? I > couldn't write an expression like "match a non-greedy .* which > does not have a inside. > You can't write a regular expression to do this. And no, I'm not going to w

Matching HTML tags with RegExp

2008-11-30 Thread Canol Gökel
Hi, My problem is to match HTML tags with RegExp. I managed to match something like this, properly: la la la a paragraph bla bla bla another paragraph ya ya ya But when nested, there arises problems: a paragraph bla bla bla la la la It matches A paragraph bla bla bla instead of matching the

Re: How to match HTML tag with RegExp

2008-11-30 Thread ZuLuuuuuu
On Sat, 29 Nov 2008 21:19:01 -0500 [EMAIL PROTECTED] ("Chas. Owens") wrote: > The most power comes from using Perl's variant of regexes. Since > other languages don't implement those extensions, and you are planning > on using a language other than Perl, you are wasting your time here. I know Pe

Re: How to match HTML tag with RegExp

2008-11-30 Thread Canol Gökel
On Sat, 29 Nov 2008 21:19:01 -0500 [EMAIL PROTECTED] ("Chas. Owens") wrote: > The most power comes from using Perl's variant of regexes. Since > other languages don't implement those extensions, and you are planning > on using a language other than Perl, you are wasting your time here. I know Pe

Re: How to match HTML tag with RegExp

2008-11-30 Thread Raymond Wan
Hi Canol, Sorry your experience with this mailing list has been less than satisfactory. I wasn't following the discussion at all, and I'm sure many on the list were enjoying their weekend... The Perl community is much more than this mailing list. It is the sum of the many books that have

Re: How to match HTML tag with RegExp

2008-11-30 Thread Mr. Shawn H. Corey
On Sat, 2008-11-29 at 20:56 -0800, ZuLuu wrote: > How can I match structures like > this: > > [block] > this is a block > [block] > this is another block > [/block] > first block ends > [/block] > You can't. In order to correctly interpret a s

Re: Mailing list

2008-11-30 Thread Bart Lateur
On Sat, 29 Nov 2008 17:24:44 +0530, Sureshkumar M (HCL Financial Services) wrote: >Can someone send the maid's for Perl forum where I can clear >all my doubts? I would like to discuss lot of doubts and get answer and >get quick answers. It depends on the subject of the question. You c

Re: How to match HTML tag with RegExp

2008-11-30 Thread ZuLuuuuuu
On Sat, 29 Nov 2008 21:19:01 -0500 [EMAIL PROTECTED] ("Chas. Owens") wrote: > The most power comes from using Perl's variant of regexes. Since > other languages don't implement those extensions, and you are planning > on using a language other than Perl, you are wasting your time here. I know Pe

Re: How to match HTML tag with RegExp

2008-11-30 Thread Canol Gökel
Thanks people I already got the answer from somewhereelse. I can't quote the last reply, I guess I have a problem with my newsreader. But you even call me stupid. I heard before that Perl community is rude, and now I experienced it myself. I guess Perl community deserves the reputation of being ru

Re: How to match HTML tag with RegExp

2008-11-30 Thread Dr.Ruud
Canol Gökel schreef: > My problem is to match HTML tags with RegExp. What is your personal definition of a tag? To match a tag, you could use "/<[^>]*>/" but that would also match "<>". Maybe you are just looking for "/<[A-Za-z]+>/"? > I managed to match > something like this, properly: > > l