Photo Gallery Member List Search Calendars FAQ Ticket List Log Out


Regulae expression question

 
Logged in as: Guest
arrSession:exec spGetSession 2,2,62110
 Active Users: There are 0 members and 0 guests.
 Users viewing this topic: none
 

 

 
  
  Printable Version
All Forums >> [Scripting] >> WSH & Client Side VBScript >> Regulae expression question
  Do you like VisualBasicScript.com? Link to us and help spread the word about our forum. Thanks!
Page: [1]
Login
Message << Older Topic   Newer Topic >>
 Regulae expression question - 7/2/2008 12:54:05 AM   
  shahid09

 

Posts: 58
Score: 0
Joined: 1/22/2007
Status: offline
Hi All,
I want to use regex for Contract IDS  second last digit will always be  5.
Any suggestion how can i use regex here ?
My solution is something like this


      
Our contract ID is in this format.
R51001550
R23434567
R12489750
R23456560
Thanks,
Shahid
 
 
Post #: 1
 
 RE: Regulae expression question - 7/2/2008 1:52:55 AM   
  ebgreen


Posts: 5041
Score: 31
Joined: 7/12/2005
Status: offline
So of the ones that you listed:

R51001550
R23434567
R12489750
R23456560

what is supposed to match?

_____________________________

"... when you are good and crazy, oooh, oooh, oooh, the sky is the limit!" - The Tick
Goog places to start:http://www.visualbasicscript.com/m_24727/tm.htm
http://www.visualbasicscript.com/m_47117/tm.htm

(in reply to shahid09)
 
 
Post #: 2
 
 RE: Regulae expression question - 7/7/2008 11:58:02 AM   
  TNO


Posts: 1284
Score: 12
Joined: 12/18/2004
From: thenewobjective.com
Status: online
If the 2nd to last digit is supposed to always be "5", use this (matches the 1st and 3rd example):

R\d{6}5\d

To match all your given examples:

R\d{8}

_____________________________

To iterate is human, to recurse divine. -- L. Peter Deutsch

(in reply to ebgreen)
 
 
Post #: 3
 
 
 
  

If you found our site useful please link to us <a href="http://www.visualbasicscript.com">VisualBasicScript.com</a>.
All Forums >> [Scripting] >> WSH & Client Side VBScript >> Regulae expression question Page: [1]
Jump to:





New Messages No New Messages
Hot Topic w/ New Messages Hot Topic w/o New Messages
Locked w/ New Messages Locked w/o New Messages
 Post New Thread
 Reply to Message
 Post New Poll
 Submit Vote
 Delete My Own Post
 Delete My Own Thread
 Rate Posts