The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Help learning regex filtering syntax: powerful tool

Discussion in 'General Discussion' started by silverbytes, Jun 1, 2006.

  1. silverbytes

    silverbytes Member

    Joined:
    May 31, 2006
    Messages:
    9
    Likes Received:
    0
    Trophy Points:
    1
    May somebody help me learning how to write regex (regular expressions) to filter email in cpanel?

    I couldn't find a good manual, tutorial or something about it.

    I'd like to know how to filter using wildcards, words starting with..., variations, entire words only, conditions...
     
  2. asterisk

    asterisk Well-Known Member

    Joined:
    Nov 11, 2005
    Messages:
    61
    Likes Received:
    0
    Trophy Points:
    6
  3. silverbytes

    silverbytes Member

    Joined:
    May 31, 2006
    Messages:
    9
    Likes Received:
    0
    Trophy Points:
    1
    good one! thank you!
     
  4. swdlh

    swdlh Member

    Joined:
    Jul 3, 2006
    Messages:
    9
    Likes Received:
    0
    Trophy Points:
    1
    here is a great tester

    http://www.regexlib.com/RETester.aspx

    now if i could find a ref of what needs to be done to make them survive the trip thru cpanel ;-)


    This regex ^[\*]{4,7}$ (detects 4 to 7 "*" in "spam-level:") gets messed up entering it into the cpanel email filter. also tried editing .filter, and backup/edit/restore the exim filter file.

    I found a post (RE[##]) that has a regex that has escapes (\) all over the place, I need the rules (or workarounds) that cpanel requires. any help?

    thanks -larry / dallas
     
  5. swdlh

    swdlh Member

    Joined:
    Jul 3, 2006
    Messages:
    9
    Likes Received:
    0
    Trophy Points:
    1

    Never mind, cpanel and exim are not regex friendly, but I found workarounds. ;-)

    -l
     
Loading...

Share This Page