How to extract what you need when reading variables from a web page or a database

You could use regular expression in the "Characters To Exclude" field in GET_WEB_VALUE, SET_VAR and GET_DB_VALUE commands. Here are some useful ones that frequently occur: 

 

1. Remove all non-digits "\D+". Suppose you read a price $2,330 and you want to make sure is less than 3000. There are "$" and "," characters that need to be removed in order for you to make the comparison so you could use the expression to remove any non-digit. 

2. Remove all special characters: "[^0-9a-zA-Z]+". This will remove any spaces, commas, semi-col and any invisible character that might look like a space. 

 

Was this article helpful?
1 out of 1 found this helpful
Have more questions? Submit a request

Comments

  • Avatar
    Afshin (AJ) Sharifi

    Please show the syntax, example, or how it is used in the script.

    0
    Comment actions Permalink

Please sign in to leave a comment.