help with regular expression (for spam catching)

From: Chris W. Parker (cparker_at_swatgear.com)
Date: 06/04/04

  • Next message: Mike Burger: "Re: OT (maybe) DNS delagation on RH9"
    Date: Fri, 4 Jun 2004 11:23:02 -0700
    To: <redhat-list@redhat.com>
    
    

    hello.

    i have no idea what this would be called or if it's even possible with
    one line of a regex so that's why i'm coming to the list.

    everyone can identify words like:

      viagra
      v1agra
      v1@gr@
      vi@gra
      etc.

    but how do you identify those same words when random punctuation is
    thrown in?

      vi.agra
      v1a;gr.a
      etc.

    is it possible for a regular expression to do something like the
    following:

    1. first identify the following string:
        /v[!1i\|][a@]gr[a@]/
    2. then check to see if there are any of the following characters in
    there somewhere:
        /[\.;:\/]/

    i guess you *could* do something like the following:

     
    /v[\.;:\/]?[!1i\|][\.;:\/]?[a@][\.;:\/]?g[\.;:\/]?r[\.;:\/]?[a@][\.;:\/]
    ?/

    but that just seems overly complicated... ?

    any suggestions?

    thanks,
    chris.

    -- 
    redhat-list mailing list
    unsubscribe mailto:redhat-list-request@redhat.com?subject=unsubscribe
    https://www.redhat.com/mailman/listinfo/redhat-list
    

  • Next message: Mike Burger: "Re: OT (maybe) DNS delagation on RH9"

    Relevant Pages

    • Re: Standard C Library regex performance issue
      ... except for the number of characters you have to type in. ... To specify more than one option, "or" them together with the | operator: ... By default, Python's regex engine only considers the letters A through Z, the ... The above implies that Pyhton's newline mode is *ON* by default. ...
      (comp.lang.c)
    • Re: Help with Regex (UserName, Email)
      ... I have a feeling you haven't tried regex till now, ... If Name = ALL recurring characters, excluding spacing, ... ShowMessage: Please re-enter the Name again. ...
      (microsoft.public.dotnet.languages.csharp)
    • Re: matching ? in a string ending with digits
      ... for my $item (@arr) { ... what other characters will fail to match in a string ... regex to fail as mentioned. ...
      (comp.lang.perl.misc)
    • Re: Regex question
      ... I didn't know the range would be that much different from SQL ... The problem is that my regex only gets ... should write a regex pattern that matches _that_, ... remove all the characters from the string that aren't digits or '/' ...
      (microsoft.public.dotnet.languages.csharp)
    • Re: Usename regex
      ... which have alphanumberic characters and one underscore. ... From what I understand is I can use a regex to do this. ... Think of a string, preferably very long that contains only alphanumeric characters, but end in a # sign. ...
      (microsoft.public.dotnet.framework.aspnet)