Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
"Regular Expression for my output"
#5
Solved: 11 Years, 3 Months, 3 Weeks ago
Hi Sures,

Can you try this..


Code:
strText="Test_101UP_abcde_UNIT"

Set RegEx = CreateObject("VBScript.RegExp")
'The below is the patter which can be used in your case
'\d{1,} - means any digit which will occur atleast once and may appear n times
'[a-z]{2,} - any two digit character to n length characted
'$ - indicates the end of the string

Code:
RegEx.Pattern ="^Test_\d{1,}UP_[a-z]{2,}_UNIT$"

result=RegEx.Test(strText)
If result=True Then
    msgbox "Pass"
Else
    msgbox "Fail"
End If

Set RegEx=Nothing

let me know if it works.

Regards,
Ankesh
Reply


Messages In This Thread
"Regular Expression for my output" - by suresz449 - 12-08-2011, 05:53 PM
RE: "Regular Expression for my output" - by Ankesh - 12-13-2011, 04:35 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Need Any digit in xpath path using Regular expression Priyam 1 3,495 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,361 04-09-2015, 01:56 AM
Last Post: sarahq49
  Regular expression and script optimisation Padmavathy 1 3,830 03-30-2015, 11:46 AM
Last Post: supputuri
  Regular expression in descriptive programming testernc 1 16,576 12-08-2014, 06:38 PM
Last Post: anshika.agarwal
  need a regular expression. anu05446 0 3,123 11-26-2014, 03:00 PM
Last Post: anu05446

Forum Jump:


Users browsing this thread: 1 Guest(s)