Results 1 to 4 of 4

Thread: Anyone program in Perl?

  1. #1
    Join Date
    Oct 2006
    Location
    The Heart of Dixie
    Posts
    4,268

    Anyone program in Perl?

    If your familiar with Perl I have what will be a simple question for you. I have set up a Spam program and I need to add an exception of the list and it has to be written as a Perl expression and I can't figure it out. So I need a little help

    My command is 'subject HCC' BUT, I want to add a wild card after HCC so that that anything that follows HCC is accepted. I have been reading the Perl for Dummies but I can't figure this one out.
    Last edited by Jeff Horton; 02-10-2009 at 01:48 PM.
    God grant me the senility to forget the people I never liked anyway,
    the good fortune to run into the ones I do,
    and the eyesight to tell the difference.


    Kudzu Craft Lightweight Skin on frame Kayaks.
    Custom built boats and Kits

  2. #2
    Join Date
    Nov 2006
    Location
    Ottawa
    Posts
    6
    Is it a Perl regular expression you are looking for? If so:

    Code:
    /subject HCC.*/
    will match anything that begins with the string:

    subject HCC
    The dot matches any character and the asterisk says match any number of characters. Dot-asterisk together says "match any number of any characters".

  3. #3
    Join Date
    Oct 2006
    Location
    The Heart of Dixie
    Posts
    4,268
    That should help. It's sever software called Boxtrapper, you may be familiar with it. Just trying to add a couple of mailing lists using the subject so I don't have to whitelist every members email address. That would be never ending!!

    Here is their examples they give:

    subject i love you
    from nick\@nicedomain\.org
    from .+\@domain\.com
    cc mailinglist\@domain\.com
    to alias\@domain\.com

    Base on that and what you said I am assuming my command should be

    subject hcc.*/
    God grant me the senility to forget the people I never liked anyway,
    the good fortune to run into the ones I do,
    and the eyesight to tell the difference.


    Kudzu Craft Lightweight Skin on frame Kayaks.
    Custom built boats and Kits

  4. #4
    Join Date
    Aug 2007
    Location
    Reno NV
    Posts
    13,357
    I think Mat has steered you straight on this.

    Here's a little regex tester.

    http://www.spaweditor.com/scripts/regex/index.php

    I entered
    /HCC.+/
    as the regular expression and
    HCC This is a test
    as the test data.

    I'm assuming that you will be putting that into your 'blacklist' and It shows that it will trap anything starting with HCC

    I'm actually going to book mark this page, as it looks like a nice little way to test these sorts of things....
    Programmer - An organism that turns coffee into software.
    If all your friends are exactly like you, What an un-interesting life it must be.
    "A door is what a dog is perpetually on the wrong side of" Ogden Nash


Similar Threads

  1. New Excercise Program
    By Dan Mooney in forum Off Topic Discussion
    Replies: 0
    Last Post: 07-28-2010, 06:16 AM
  2. Plywood Cut list program for a Mac?
    By Mark Rios in forum General Woodworking Q&A
    Replies: 0
    Last Post: 10-10-2009, 01:58 AM
  3. Decent Graphics Program for Mac
    By Stuart Ablett in forum Off Topic Discussion
    Replies: 20
    Last Post: 09-17-2009, 05:39 PM
  4. Interesting community program
    By Douglas Jones in forum Off Topic Discussion
    Replies: 2
    Last Post: 07-03-2008, 04:52 PM
  5. Festool giveaway program.
    By Steve Ash in forum Off Topic Discussion
    Replies: 5
    Last Post: 04-02-2007, 12:44 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •