Regular Expression Help | 
 
    Post Reply  
   | 
  
| Author | |
   
   Dan B  
   
   Senior Member  
    
   Joined: 09 February 2005 Location: United States Status: Offline Points: 105  | 
  
   
      Post Options
    
        Thanks(0)
      Quote   Reply
   
     Topic: Regular Expression HelpPosted: 11 January 2006 at 2:48pm  | 
 
| 
   
    I'm trying to get a RexEx for a following example to email address. I've been using the RegEx Test and having no luck. Let say I would like to block an address that is thisname@mydomain.com only and not block any other combination with any_number_of_letters_thisname@mydomain.com including the underscores I have the following: ((?i)([^\w]+)thisname\@mydomain\.com) It's not working correctly. It's doing the opposite. It's catching any_number_of_letters_thisname@mydomain.com but not just thisname@mydomain.com If anybody could help that would be great.  | 
 |
![]()  | 
 |
   
   Desperado  
   
   Senior Member  
   Joined: 27 January 2005 Location: United States Status: Offline Points: 1143  | 
  
   
      Post Options
    
        Thanks(0)
      Quote   Reply
   
     Posted: 12 January 2006 at 10:57am | 
 
| 
   
    Dan, Perhaps I am not understanding the question but ... ((?i)^thisname\@mydomain\.com)  | 
 |
| 
   
     
     The Desperado
 
   
  Dan Seligmann. Work: http://www.mags.net Personal: http://www.desperado.com  | 
 |
![]()  | 
 |
   
   Dan B  
   
   Senior Member  
    
   Joined: 09 February 2005 Location: United States Status: Offline Points: 105  | 
  
   
      Post Options
    
        Thanks(0)
      Quote   Reply
   
     Posted: 12 January 2006 at 11:32am | 
 
| 
   
    Dan S, This is what I want to happen example. do not block anthing else. I hope this helps. Thanks,  | 
 |
![]()  | 
 |
   
   Desperado  
   
   Senior Member  
   Joined: 27 January 2005 Location: United States Status: Offline Points: 1143  | 
  
   
      Post Options
    
        Thanks(0)
      Quote   Reply
   
     Posted: 12 January 2006 at 12:43pm | 
 
| 
   
    Dan, The RegEx I posted *should* do that. At least, it does in my tests.  | 
 |
| 
   
     
     The Desperado
 
   
  Dan Seligmann. Work: http://www.mags.net Personal: http://www.desperado.com  | 
 |
![]()  | 
 |
   
   Dan B  
   
   Senior Member  
    
   Joined: 09 February 2005 Location: United States Status: Offline Points: 105  | 
  
   
      Post Options
    
        Thanks(0)
      Quote   Reply
   
     Posted: 12 January 2006 at 3:34pm | 
 
| 
   
    Dan, Something is very strange. I copied and pasted your example and tried it and it didn't work. I went to lunch and tried it again when I came back and it now works in the test with out changing anything. Thanks,  | 
 |
![]()  | 
 |
   
   Dan B  
   
   Senior Member  
    
   Joined: 09 February 2005 Location: United States Status: Offline Points: 105  | 
  
   
      Post Options
    
        Thanks(0)
      Quote   Reply
   
     Posted: 12 January 2006 at 3:46pm | 
 
| 
   
    Dan, I'm having a brain fart today. Can you explain the reason of using the (?i) in front of any RegEx Thanks, 
 
  | 
 |
![]()  | 
 |
   
   Desperado  
   
   Senior Member  
   Joined: 27 January 2005 Location: United States Status: Offline Points: 1143  | 
  
   
      Post Options
    
        Thanks(0)
      Quote   Reply
   
     Posted: 13 January 2006 at 1:53pm | 
 
| 
   
    Hmmm ... my perl habit I makes sure that there is NO case sensitivity in the character search. Technically, if your RegEx is written in all lower case, I suppose you wouldn't need it. Edited by Desperado  | 
 |
| 
   
     
     The Desperado
 
   
  Dan Seligmann. Work: http://www.mags.net Personal: http://www.desperado.com  | 
 |
![]()  | 
 |
    Post Reply  
   | 
  |
|       
  
  Tweet   	
    | 
 
| Forum Jump | Forum Permissions  ![]() You cannot post new topics in this forum You cannot reply to topics in this forum You cannot delete your posts in this forum You cannot edit your posts in this forum You cannot create polls in this forum You cannot vote in polls in this forum  | 
 
This page was generated in 0.195 seconds.
 
 
 
 
 
 
 Topic Options
   
   
 Post Options
 Thanks(0)
 

