Micro Focus QTP (UFT) Forums

Full Version: Please read this: Regular Expressions
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Welcome to Software Testing Tools Forum, a place to get your questions answered by experts.
  1. Please go through Posting Guidelines before posting on this forum.
  2. Please go through Regular Expressions for QTP for good understanding of regular expressions.
  3. You can check your regular expressions at http://www.nvcc.edu/home/drodgers/ceu/re...regexp.asp
Hi Ankur,Your suggeted link for Regx http://www.nvcc.edu/home/drodgers/ceu/re...regexp.asp
is not working properly.
Plz check once.
What do you mean by "not working properly"?

If you meant "its not opening", I have checked on firefox as well as IE and I am able to open the given link.
Hi Ankur,
I enterd as
Regular Expression:[A-Za-z]*
&Test String:abc123
then When I click on the test button its showing as
Test Results: True
It should be False.Bcoz the string contain numaric values.


--------------------------------------------------------------------------------
It is giving correct result.

Regular Expression:[A-Za-z]* means match capital A-Z or small a-z 0 or more times so even if you have 123 instead of abc it will pass.

Change it to [A-Za-z]+ (match capital A-Z or small a-z 1 or more times) and you will see that a123 would be "True" but 123 would yield "false"
Hi Ankur,

How to use regular expression in replace function
I want to discard numbers in text
Below is the issue
Text1 = "hello1234"
replace(Text1,[0-9],"") 'This line throws syntax error
@kamalteja: please post a new question on a separate thread.