Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
How to disable regular expressions in a text?
#2
Solved: 11 Years, 3 Months, 3 Weeks ago
Hi,
Please use the below function. It receives a normal string and returns the equivalent string in regular expression
Code:
Function NormalizeString(OrgStr)
       Dim TempStr
       TempStr = Replace(OrgStr, "\", "\\")
       TempStr = Replace(TempStr, "*", "\*")
       TempStr = Replace(TempStr, "+", "\+")
       TempStr = Replace(TempStr, ".", "\.")
       NormalizeString = Replace(TempStr, "?", "\?")
End function
Msgbox NormalizeString ("a+b*c.d?e")
Reply


Messages In This Thread
RE: How to disable regular expressions in a text? - by ravi.gajul - 02-27-2013, 09:57 AM

Possibly Related Threads…
Thread Author Replies Views Last Post
At Regular Expressions for e-mail address ganesh.dengale 6 19,191 08-23-2022, 02:51 PM
Last Post: ahmad3029
  Need help on using regular expressions on Java Window's title qa_tester 3 5,076 02-13-2012, 10:56 PM
Last Post: madsenfr
  java window titles & regular expressions jotdog2 1 4,226 02-13-2012, 10:55 PM
Last Post: madsenfr
  Process to use Regular Expressions in QTP using screen shots. yvslraotesting@gmail.com 1 3,509 01-31-2012, 12:45 PM
Last Post: basanth27
  Run error: Object is disable bea 5 11,691 01-11-2012, 12:45 AM
Last Post: sunnyk8

Forum Jump:


Users browsing this thread: 1 Guest(s)