Hi, I need help with regular expression again. scenario is to handle dynamic date and time
Ex: 09/11/2012 9:10 AM
Another one is just 2 string
Ex : Grant Approved
Ex: 09/11/2012 9:10 AM
Another one is just 2 string
Ex : Grant Approved
Help Again with regular expression
|
Hi, I need help with regular expression again. scenario is to handle dynamic date and time
Ex: 09/11/2012 9:10 AM Another one is just 2 string Ex : Grant Approved
Hi Jinnah,
Date Regular Expression: Format: MM/DD/YYYY MM: (0[1-9]|1[0-2]) DD: (0[1-9]|1[0-9]|2[0-9]|3[0-1]) YYYY: ([0-9][0-9][0-9][1-9]|[1-9]000|[1-9][1-9]00|[1-9][1-9][1-9]0) * Assuming that Max year is 9999 Time Regular Expression: Here Max Time: 23:59:59 and Min Time: 00:00:00 Hours: ([0-1][0-9]|2[0-3]) Mins: ([0-5][0-9]) Secs: ([0-5][0-9]) | Choice between two lines ( ) Used to group multiple regular expressions [-] To specify a range Try this it may helpful... I am not sure about the 2nd thing... Regards, Sibi C A
Awesome! What if i need to combine both date and time ? What conjunction should be used? Thank you very much again.
Ex1 : MM/DD/YYYY
Ex2 : Hours:Mins:Secs Include the regular expressions instead of MM DD YYYY Hours Mins Secs.For Dynamic date use '/' (see Ex1) as conjuction.Like this, you can use conjuction ':' (see Ex2) in dynamic time. Regards, Sibi C A
I actually need the whole date and time in one regular expression.
And I still have problem handling a text string like "negligent sale of goods and services" Thanks for the help Code: InjuredPerson=Browser("ClaimCenter_Br").Page("ClaimCenter_Pg").WebList("InjuredPerson_PIP").GetROProperty("selection") Number 8 is dynamic. I tried "#[0-9]" "#[0-9]+" "#*" "#d\" "#d\+" None workd Except "#8". I am facing same kind of problem in several places. Where only numbers get changed. Need solution badly.
@ Jinnah,
You can not simply compare the regular expression using conditional statement. Let me explain it to you. Below are the basic steps that you need to follow. 1. You need to create an object of VbScript.RegExp 2. Assign the pattern you want to test. 3. Pass your string and check the result. It only returns true/False for successful/Unsuccessful results. Let me give you one example. Code: Set RegEx = CreateObject("VBScript.RegExp") Let me know if you need more help. Regards, Ankesh
Great! I will try it today. I will let you know.Hope it will work. Thanks buddy
Hi Finally I could make it work Thanks buddy!
Code: SelectionItem=Browser("").Page("").WebList("").GetROProperty("selection") Thank you very very very much
Glad that it worked for you.
![]() |
« Next Oldest | Next Newest »
|
Possibly Related Threads… | |||||
Thread | Author | Replies | Views | Last Post | |
Need Any digit in xpath path using Regular expression | Priyam | 1 | 3,650 |
10-05-2016, 11:05 AM Last Post: Ankur |
|
Regular expression to read two words in lowercase, uppercase and with and without spa | sarahq49 | 1 | 3,507 |
04-09-2015, 01:56 AM Last Post: sarahq49 |
|
Regular expression and script optimisation | Padmavathy | 1 | 4,036 |
03-30-2015, 11:46 AM Last Post: supputuri |
|
Regular expression in descriptive programming | testernc | 1 | 16,750 |
12-08-2014, 06:38 PM Last Post: anshika.agarwal |
|
need a regular expression. | anu05446 | 0 | 3,206 |
11-26-2014, 03:00 PM Last Post: anu05446 |