Spam Filter ISP Support Forum

  New Posts New Posts RSS Feed - RegEX - Corrected / clearer explanation
  FAQ FAQ  Forum Search   Register Register  Login Login

RegEX - Corrected / clearer explanation

 Post Reply Post Reply
Desperado View Drop Down
Senior Member
Senior Member

Joined: 27 January 2005
Location: United States
Status: Offline
Points: 1143
Post Options Post Options   Thanks (0) Thanks(0)   Quote Desperado Quote  Post ReplyReply Direct Link To This Post Topic: RegEX - Corrected / clearer explanation
    Posted: 18 July 2003 at 10:08am
I am posting this because I was asked a question, by email, on my explanation that I posted earlier.  I realized that, reading my own post, it was unclear and or even in error.  I will attempt to correct that here.  If anyone out there sees an error in this posting PLEASE correct me.
I see where there is some  confusion and I see where my explanations fall short.  But let me again remark .... I am no expert on regular expressions but doing a lot of Perl programming has forced me into being able to use them somewhat, sorta, ok.  I make mistakes, like anyone.
 Questions on the RegEx below
The expression [!--]  Very easy to see the confusion ...  This means to look for a SINGLE character from Bang (!) to Dash (-).  This is not looking for the literal "!--".  So, I am trying to detect the opening tag "<" followed by any one of the following 13 characters: ! " # $ % & ' ( ) * + , -  The Bang Dash Dash happens to fit that because the first char is a ! .  If we want to detect "!--"  the expression would be (!\-\-).  Be careful here .... [!\-\-] won't work for that and actually is redundant.  That expression looks for Bang OR dash OR dash where if the expression is enclosed in () it looks for the exact "phrase".
Dan S.
Back to Top
Gabriel Langen View Drop Down
Guest Group
Guest Group
Post Options Post Options   Thanks (0) Thanks(0)   Quote Gabriel Langen Quote  Post ReplyReply Direct Link To This Post Posted: 20 July 2003 at 5:40am

Thank you!

I had the idea (but my English is to poor) to make the same remark (but shorter).


Back to Top
 Post Reply Post Reply
  Share Topic   

Forum Jump Forum Permissions View Drop Down

This page was generated in 0.119 seconds.