{"id":954,"date":"2022-12-05T05:55:11","date_gmt":"2022-12-05T05:55:11","guid":{"rendered":"https:\/\/www.softwaretestingstuff.com\/?p=954"},"modified":"2023-03-07T05:36:31","modified_gmt":"2023-03-07T05:36:31","slug":"defining-regular-expressions","status":"publish","type":"post","link":"https:\/\/www.softwaretestingstuff.com\/2013\/08\/defining-regular-expressions.html","title":{"rendered":"Defining Regular Expressions"},"content":{"rendered":"\n

In QTP, you can use regular expressions only for values of type string. In QTP, you can define a regular expression for a constant value, a Data Table parameter value, an Environment parameter value, or a property value in a programmatic description.<\/p>\n\n\n\n

You can define a regular expression by entering the regular expression syntax for the string in the Value box in the Constant Value Options dialog box or the Parameter Options dialog box. You instruct QTP to treat the value as a regular expression by selecting the Regular Expression check box.
All programmatic description property values are automatically treated as regular expressions.

By default, QTP treats all characters in a regular expression literally, except for the period (.), hyphen (-), asterisk (*), caret (^), brackets ([ ]), parentheses (()), dollar sign ($), vertical line (|), plus sign (+), question mark (?), and backslash (\\). When one of these special characters is preceded by a backslash (\\), QTP treats it as a literal character.

If you enter a special character in the Value box of the Constant Value Options or the Parameter Options dialog box, QTP asks you if you want to add a backslash (\\) before each special character.

If you click Yes<\/strong>, a backslash (\\<\/strong>) is added before the special character to instruct QTP to treat the character literally. If you click No<\/strong>, QTP treats the special character as a regular expression character.<\/p>\n","protected":false},"excerpt":{"rendered":"

In QTP, you can use regular expressions only for values of type string. In QTP, you can define a regular expression for a constant value, a Data Table parameter value, an Environment parameter value, or a property value in a programmatic description. You can define a regular expression by entering the regular expression syntax for the string […]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"site-sidebar-layout":"default","site-content-layout":"","ast-site-content-layout":"","site-content-style":"default","site-sidebar-style":"default","ast-global-header-display":"","ast-banner-title-visibility":"","ast-main-header-display":"","ast-hfb-above-header-display":"","ast-hfb-below-header-display":"","ast-hfb-mobile-header-display":"","site-post-title":"","ast-breadcrumbs-content":"","ast-featured-img":"","footer-sml-layout":"","theme-transparent-header-meta":"","adv-header-id-meta":"","stick-header-meta":"","header-above-stick-meta":"","header-main-stick-meta":"","header-below-stick-meta":"","astra-migrate-meta-layouts":"default","ast-page-background-enabled":"default","ast-page-background-meta":{"desktop":{"background-color":"var(--ast-global-color-4)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"tablet":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"mobile":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""}},"ast-content-background-meta":{"desktop":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"tablet":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"mobile":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""}},"footnotes":""},"categories":[14],"tags":[],"table_tags":[],"class_list":["post-954","post","type-post","status-publish","format-standard","hentry","category-software-testing-certification"],"yoast_head":"\nDefining Regular Expressions - Software Testing Stuff<\/title>\n<meta name=\"description\" content=\"Are you ready to take your coding skills to the next level? Learn how to define regular expressions like a pro and open the doors to endless coding possibilities!\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.softwaretestingstuff.com\/2013\/08\/defining-regular-expressions.html\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Defining Regular Expressions - Software Testing Stuff\" \/>\n<meta property=\"og:description\" content=\"Are you ready to take your coding skills to the next level? Learn how to define regular expressions like a pro and open the doors to endless coding possibilities!\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.softwaretestingstuff.com\/2013\/08\/defining-regular-expressions.html\" \/>\n<meta property=\"og:site_name\" content=\"Software Testing Stuff\" \/>\n<meta property=\"article:author\" content=\"https:\/\/www.facebook.com\/tdipto\" \/>\n<meta property=\"article:published_time\" content=\"2022-12-05T05:55:11+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2023-03-07T05:36:31+00:00\" \/>\n<meta name=\"author\" content=\"Rahnuma Tasnim\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@tanvir@softwaretestingstuff.com\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Rahnuma Tasnim\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"1 minute\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/www.softwaretestingstuff.com\/2013\/08\/defining-regular-expressions.html#article\",\"isPartOf\":{\"@id\":\"https:\/\/www.softwaretestingstuff.com\/2013\/08\/defining-regular-expressions.html\"},\"author\":{\"name\":\"Rahnuma Tasnim\",\"@id\":\"https:\/\/www.softwaretestingstuff.com\/#\/schema\/person\/388084d27e3299c8bdcdc784ba5600bc\"},\"headline\":\"Defining Regular Expressions\",\"datePublished\":\"2022-12-05T05:55:11+00:00\",\"dateModified\":\"2023-03-07T05:36:31+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/www.softwaretestingstuff.com\/2013\/08\/defining-regular-expressions.html\"},\"wordCount\":233,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\/\/www.softwaretestingstuff.com\/#organization\"},\"articleSection\":[\"Software Testing Certification\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/www.softwaretestingstuff.com\/2013\/08\/defining-regular-expressions.html#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.softwaretestingstuff.com\/2013\/08\/defining-regular-expressions.html\",\"url\":\"https:\/\/www.softwaretestingstuff.com\/2013\/08\/defining-regular-expressions.html\",\"name\":\"Defining Regular Expressions - Software Testing Stuff\",\"isPartOf\":{\"@id\":\"https:\/\/www.softwaretestingstuff.com\/#website\"},\"datePublished\":\"2022-12-05T05:55:11+00:00\",\"dateModified\":\"2023-03-07T05:36:31+00:00\",\"description\":\"Are you ready to take your coding skills to the next level? Learn how to define regular expressions like a pro and open the doors to endless coding possibilities!\",\"breadcrumb\":{\"@id\":\"https:\/\/www.softwaretestingstuff.com\/2013\/08\/defining-regular-expressions.html#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.softwaretestingstuff.com\/2013\/08\/defining-regular-expressions.html\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.softwaretestingstuff.com\/2013\/08\/defining-regular-expressions.html#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/www.softwaretestingstuff.com\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Defining Regular Expressions\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.softwaretestingstuff.com\/#website\",\"url\":\"https:\/\/www.softwaretestingstuff.com\/\",\"name\":\"Software Testing Stuff\",\"description\":\"Unlock the power of efficient testing and elevate your testing game\",\"publisher\":{\"@id\":\"https:\/\/www.softwaretestingstuff.com\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.softwaretestingstuff.com\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/www.softwaretestingstuff.com\/#organization\",\"name\":\"Software Testing Stuff\",\"url\":\"https:\/\/www.softwaretestingstuff.com\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.softwaretestingstuff.com\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/www.softwaretestingstuff.com\/wp-content\/uploads\/2022\/12\/logo-sts.png\",\"contentUrl\":\"https:\/\/www.softwaretestingstuff.com\/wp-content\/uploads\/2022\/12\/logo-sts.png\",\"width\":3268,\"height\":455,\"caption\":\"Software Testing Stuff\"},\"image\":{\"@id\":\"https:\/\/www.softwaretestingstuff.com\/#\/schema\/logo\/image\/\"}},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.softwaretestingstuff.com\/#\/schema\/person\/388084d27e3299c8bdcdc784ba5600bc\",\"name\":\"Rahnuma Tasnim\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.softwaretestingstuff.com\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/41c8421a46bfdc7a8c3777359a8ce20e?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/41c8421a46bfdc7a8c3777359a8ce20e?s=96&d=mm&r=g\",\"caption\":\"Rahnuma Tasnim\"},\"description\":\"Rahnuma is a technical content writer at software testing stuff. A software engineer by degree and a dynamic content creator by passion, she brings to table over 3 years of writing experience in tech niche. Combining her enthusiasm for writing and technology, she loves to share her thoughts on the latest tech trends.\",\"sameAs\":[\"https:\/\/www.linkedin.com\/in\/rahnuma-tasnim-770402216\/\",\"https:\/\/www.facebook.com\/tdipto\",\"https:\/\/x.com\/tanvir@softwaretestingstuff.com\"],\"url\":\"https:\/\/www.softwaretestingstuff.com\/author\/tanvirsoftwaretestingstuff-com\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Defining Regular Expressions - Software Testing Stuff","description":"Are you ready to take your coding skills to the next level? Learn how to define regular expressions like a pro and open the doors to endless coding possibilities!","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.softwaretestingstuff.com\/2013\/08\/defining-regular-expressions.html","og_locale":"en_US","og_type":"article","og_title":"Defining Regular Expressions - Software Testing Stuff","og_description":"Are you ready to take your coding skills to the next level? Learn how to define regular expressions like a pro and open the doors to endless coding possibilities!","og_url":"https:\/\/www.softwaretestingstuff.com\/2013\/08\/defining-regular-expressions.html","og_site_name":"Software Testing Stuff","article_author":"https:\/\/www.facebook.com\/tdipto","article_published_time":"2022-12-05T05:55:11+00:00","article_modified_time":"2023-03-07T05:36:31+00:00","author":"Rahnuma Tasnim","twitter_card":"summary_large_image","twitter_creator":"@tanvir@softwaretestingstuff.com","twitter_misc":{"Written by":"Rahnuma Tasnim","Est. reading time":"1 minute"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.softwaretestingstuff.com\/2013\/08\/defining-regular-expressions.html#article","isPartOf":{"@id":"https:\/\/www.softwaretestingstuff.com\/2013\/08\/defining-regular-expressions.html"},"author":{"name":"Rahnuma Tasnim","@id":"https:\/\/www.softwaretestingstuff.com\/#\/schema\/person\/388084d27e3299c8bdcdc784ba5600bc"},"headline":"Defining Regular Expressions","datePublished":"2022-12-05T05:55:11+00:00","dateModified":"2023-03-07T05:36:31+00:00","mainEntityOfPage":{"@id":"https:\/\/www.softwaretestingstuff.com\/2013\/08\/defining-regular-expressions.html"},"wordCount":233,"commentCount":0,"publisher":{"@id":"https:\/\/www.softwaretestingstuff.com\/#organization"},"articleSection":["Software Testing Certification"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.softwaretestingstuff.com\/2013\/08\/defining-regular-expressions.html#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.softwaretestingstuff.com\/2013\/08\/defining-regular-expressions.html","url":"https:\/\/www.softwaretestingstuff.com\/2013\/08\/defining-regular-expressions.html","name":"Defining Regular Expressions - Software Testing Stuff","isPartOf":{"@id":"https:\/\/www.softwaretestingstuff.com\/#website"},"datePublished":"2022-12-05T05:55:11+00:00","dateModified":"2023-03-07T05:36:31+00:00","description":"Are you ready to take your coding skills to the next level? Learn how to define regular expressions like a pro and open the doors to endless coding possibilities!","breadcrumb":{"@id":"https:\/\/www.softwaretestingstuff.com\/2013\/08\/defining-regular-expressions.html#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.softwaretestingstuff.com\/2013\/08\/defining-regular-expressions.html"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.softwaretestingstuff.com\/2013\/08\/defining-regular-expressions.html#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.softwaretestingstuff.com\/"},{"@type":"ListItem","position":2,"name":"Defining Regular Expressions"}]},{"@type":"WebSite","@id":"https:\/\/www.softwaretestingstuff.com\/#website","url":"https:\/\/www.softwaretestingstuff.com\/","name":"Software Testing Stuff","description":"Unlock the power of efficient testing and elevate your testing game","publisher":{"@id":"https:\/\/www.softwaretestingstuff.com\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.softwaretestingstuff.com\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/www.softwaretestingstuff.com\/#organization","name":"Software Testing Stuff","url":"https:\/\/www.softwaretestingstuff.com\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.softwaretestingstuff.com\/#\/schema\/logo\/image\/","url":"https:\/\/www.softwaretestingstuff.com\/wp-content\/uploads\/2022\/12\/logo-sts.png","contentUrl":"https:\/\/www.softwaretestingstuff.com\/wp-content\/uploads\/2022\/12\/logo-sts.png","width":3268,"height":455,"caption":"Software Testing Stuff"},"image":{"@id":"https:\/\/www.softwaretestingstuff.com\/#\/schema\/logo\/image\/"}},{"@type":"Person","@id":"https:\/\/www.softwaretestingstuff.com\/#\/schema\/person\/388084d27e3299c8bdcdc784ba5600bc","name":"Rahnuma Tasnim","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.softwaretestingstuff.com\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/41c8421a46bfdc7a8c3777359a8ce20e?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/41c8421a46bfdc7a8c3777359a8ce20e?s=96&d=mm&r=g","caption":"Rahnuma Tasnim"},"description":"Rahnuma is a technical content writer at software testing stuff. A software engineer by degree and a dynamic content creator by passion, she brings to table over 3 years of writing experience in tech niche. Combining her enthusiasm for writing and technology, she loves to share her thoughts on the latest tech trends.","sameAs":["https:\/\/www.linkedin.com\/in\/rahnuma-tasnim-770402216\/","https:\/\/www.facebook.com\/tdipto","https:\/\/x.com\/tanvir@softwaretestingstuff.com"],"url":"https:\/\/www.softwaretestingstuff.com\/author\/tanvirsoftwaretestingstuff-com\/"}]}},"_links":{"self":[{"href":"https:\/\/www.softwaretestingstuff.com\/wp-json\/wp\/v2\/posts\/954","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.softwaretestingstuff.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.softwaretestingstuff.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.softwaretestingstuff.com\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.softwaretestingstuff.com\/wp-json\/wp\/v2\/comments?post=954"}],"version-history":[{"count":0,"href":"https:\/\/www.softwaretestingstuff.com\/wp-json\/wp\/v2\/posts\/954\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.softwaretestingstuff.com\/wp-json\/wp\/v2\/media?parent=954"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.softwaretestingstuff.com\/wp-json\/wp\/v2\/categories?post=954"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.softwaretestingstuff.com\/wp-json\/wp\/v2\/tags?post=954"},{"taxonomy":"table_tags","embeddable":true,"href":"https:\/\/www.softwaretestingstuff.com\/wp-json\/wp\/v2\/table_tags?post=954"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}