//cell[@Accname=' 0006000 User 14/01/2015 15:03 109']
please let me know how to handle this in regular expression, date and time keep changing and 109 is the order number this also keep change...but order number stored in module variable $orderNumber.
Thanks in Advance
Regular Expression
-
- Posts: 29
- Joined: Wed Jan 15, 2014 3:32 pm
Re: Regular Expression
//cell[@Accname=' 0006000 User 14/01/2015 15:03 109']
please let me know how to handle this in regular expression, date and time keep changing and 109 is the order number this also keep change...but order number stored in module variable $orderNumber.
Validation in mainly for ordernumber....what ever time stamp is ok
Thanks in Advance
please let me know how to handle this in regular expression, date and time keep changing and 109 is the order number this also keep change...but order number stored in module variable $orderNumber.
Validation in mainly for ordernumber....what ever time stamp is ok
Thanks in Advance
Re: Regular Expression
How about variablizing the order number and using regex for the rest, like this:
Since you don't care about the date, you can use the ".*" notation to say "anything can be in this location".
Just remember to only replace the date and time strings with the .* as it doesn't always work right with whitespace.
You could also do the full regex pattern for the date and time:
Code: Select all
//cell[@Accname~' 0006000 User .* .* ' + $orderNumber]
Just remember to only replace the date and time strings with the .* as it doesn't always work right with whitespace.
You could also do the full regex pattern for the date and time:
Code: Select all
//cell[@Accname~' 0006000 User [0-3][0-9]/[0-1][0-9]/[0-9][0-9][0-9][0-9] [0-2][0-9]\:[0-5][0-9] ' + $orderNumber]
Shortcuts usually aren't...