{"id":14,"date":"2011-08-28T16:55:00","date_gmt":"2011-08-28T16:55:00","guid":{"rendered":"http:\/\/www.automationrepository.com\/?p=14"},"modified":"2011-10-09T00:26:20","modified_gmt":"2011-10-08T18:56:20","slug":"all-about-regexp-object","status":"publish","type":"post","link":"https:\/\/www.automationrepository.com\/wordpress\/2011\/08\/all-about-regexp-object\/","title":{"rendered":"RegExp Object: An Alternative to InStr() Function ?"},"content":{"rendered":"<div style=\"text-align: left;\" dir=\"ltr\">\n<div style=\"text-align: justify;\">\n<p><span style=\"font-family: Verdana,sans-serif; font-size: small;\">Did you ever encounter a situation where you needed to search a sub-string inside a string? Of course InStr() is a great function which helps users <\/span><span style=\"font-family: Verdana,sans-serif;\">solve this problem. But what happens when the sub-string you want to search contains a regular expression?<!--more--> InStr() doesn&#8217;t help when the user wants to search a regular expression. In such situations, RegExp object comes to your rescue. Let&#8217;s see how..<\/span><\/p>\n<p>&nbsp;<\/p>\n<\/div>\n<div style=\"text-align: justify;\">\n<table style=\"border: 1px solid #000000; font-family: 'Courier New',Courier,monospace;\" border=\"0\">\n<tbody>\n<tr bgcolor=\"#E0E0E0\">\n<td>\n<div style=\"text-align: justify;\">\n<p><span style=\"color: black;\">sString = <span style=\"color: #cc0000;\">&#8220;Welcome User, You have 5 New Mails&#8221;<\/span><\/span><\/p>\n<p><span style=\"color: black;\">sSubString = <span style=\"color: #cc0000;\">&#8220;Welcome .*, You have .* New Mails&#8221;<\/span><\/span><span style=\"color: #6aa84f;\">&#8216;Check if the string pattern matches &#8211; using RegExp object<\/span><\/p>\n<p><span style=\"color: black;\"><span style=\"color: blue;\">Set <\/span>objRE = <span style=\"color: blue;\">New <\/span>RegExp<\/span><\/p>\n<p><span style=\"color: black;\">objRE.<span style=\"color: blue;\">Global <\/span>= <span style=\"color: blue;\">True<\/span><\/span><\/p>\n<p><span style=\"color: black;\">objRE.<span style=\"color: blue;\">Pattern <\/span>= sSubString<\/span><\/p>\n<p><span style=\"color: black;\"><span style=\"color: blue;\">msgbox <\/span>objRE.<span style=\"color: blue;\">Execute<\/span>(sString).<span style=\"color: blue;\">Count <\/span><span style=\"color: #38761d;\">&#8216; &#8212; msgbox returns the value 1 as the RegExp object returns 1 match<\/span><\/span><span style=\"color: #38761d;\">&#8216;Check if the string pattern matches\u00a0 &#8211; using InStr<\/span><\/p>\n<p><span style=\"color: black;\"><span style=\"color: blue;\">msgbox <\/span>InStr(1, sString, sSubString, 1)\u00a0<span style=\"color: #38761d;\"> &#8216; &#8212; msgbox returns the value 0\u00a0 as it is not able to find the match using InStr<\/span><\/span><\/p>\n<\/div>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<div style=\"font-family: Verdana,sans-serif; text-align: justify;\">\n<p><strong>Let&#8217;s explore all the features of RegExp object<\/strong><\/p>\n<\/div>\n<div style=\"text-align: justify;\"><strong><span style=\"font-family: Verdana,sans-serif;\">RegExp object Properties:<\/span><\/strong><span style=\"font-family: Verdana,sans-serif;\"><span style=\"font-family: Verdana,sans-serif;\">RegExp object supports the following 3 properties:<\/span><\/span><\/div>\n<div style=\"text-align: justify;\"><span style=\"font-family: Verdana,sans-serif; text-decoration: underline;\">a) Global Property:<\/span><span style=\"font-family: Verdana,sans-serif;\"> This property indicates whether QTP should match all the occurrences of the pattern in the search string or just the first occurence. The property can take 2 values &#8211; True or False. True indicates that the pattern should match all occurrences in the string while False specifies that only the first occurrence of the pattern is matched.<\/span><\/div>\n<table style=\"border: 1px solid #000000;\" border=\"0\">\n<tbody>\n<tr bgcolor=\"#E0E0E0\">\n<td>\n<div style=\"font-family: 'Courier New',Courier,monospace;\"><span style=\"font-size: small;\">Set regEx = New RegExp<\/span><\/div>\n<div style=\"font-family: 'Courier New',Courier,monospace; text-align: justify;\"><span style=\"font-size: small;\">regEx.Pattern = &#8220;test&#8221;<\/span><\/div>\n<div style=\"font-family: 'Courier New',Courier,monospace; text-align: justify;\"><span style=\"font-size: small;\">regEx.Global = True\u00a0 &#8216; &#8212; or False \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 <\/span><\/div>\n<div style=\"font-family: 'Courier New',Courier,monospace; text-align: justify;\"><span style=\"font-size: small;\">msgbox regEx.Execute(&#8220;test testing tested&#8221;).Count<\/span><\/div>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<div style=\"font-family: Verdana,sans-serif; text-align: justify;\">\n<p><em>In this example, if the value of Global property is set as True, the msgbox count would come as 3. If the Global property value is set as False, the msgbox count comes as 1.<\/em><\/p>\n<\/div>\n<div style=\"text-align: justify;\"><span style=\"font-family: Verdana,sans-serif;\">b<\/span><span style=\"text-decoration: underline;\"><span style=\"font-family: Verdana,sans-serif;\">) IgnoreCase Property:<\/span><\/span><span style=\"font-family: Verdana,sans-serif;\"> This property specifies whether the pattern should be searched in case-sensitive manner or not. This property takes 2 values &#8211; True or False. False indicates that the search is case-sensitive while True specifies otherwise.<\/span><\/div>\n<div style=\"text-align: justify;\">\n<table style=\"border: 1px solid #000000;\" border=\"0\">\n<tbody>\n<tr bgcolor=\"#E0E0E0\">\n<td>\n<div style=\"font-family: 'Courier New',Courier,monospace;\"><span style=\"font-size: small;\">Set regEx = New RegExp<\/span><\/div>\n<div style=\"font-family: 'Courier New',Courier,monospace; text-align: justify;\"><span style=\"font-size: small;\">regEx.Pattern = &#8220;test&#8221;<\/span><\/div>\n<div style=\"font-family: 'Courier New',Courier,monospace; text-align: justify;\">\n<p><span style=\"font-size: small;\">regEx.Global = True<\/span><\/p>\n<p><span style=\"font-size: small;\">regEx.IgnoreCase = True\u00a0 &#8216; &#8212; or False <\/span><span style=\"font-size: small;\"> \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 <\/span><\/p>\n<\/div>\n<div style=\"font-family: 'Courier New',Courier,monospace; text-align: justify;\"><span style=\"font-size: small;\">msgbox regEx.Execute(&#8220;Test testing TeSted&#8221;).Count<\/span><\/div>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<div style=\"font-family: Verdana,sans-serif; text-align: justify;\">\n<p><em>Here, if the IgnoreCase property is taken as True, then the msgbox count will come as 3. For the value False, msgbox returns the count as 1.<\/em><\/p>\n<\/div>\n<div style=\"font-family: Verdana,sans-serif; text-align: justify;\">\n<p><span style=\"text-decoration: underline;\">c) Pattern Property:<\/span> This property specifies the actual pattern that needs to be matched with the string. The pattern string can contain regular expressions also. <em>[Read more about regular expression patterns <a href=\"http:\/\/www.automationrepository.com\/2011\/08\/all-about-regular-expressions-in-qtp\/\">here<\/a>]<\/em><\/p>\n<p>&nbsp;<\/p>\n<\/div>\n<div style=\"font-family: Verdana,sans-serif; text-align: justify;\"><strong>RegExp object Methods:<\/strong> RegExp object supports the following methods &#8211;<\/div>\n<div style=\"font-family: Verdana,sans-serif; text-align: justify;\"><span style=\"text-decoration: underline;\">a) Execute Method:<\/span> This method executes a regular expression search against a specified string and returns a collection of objects based on the search result.<\/div>\n<table style=\"border: 1px solid #000000;\" border=\"0\">\n<tbody>\n<tr bgcolor=\"#E0E0E0\">\n<td>\n<div style=\"font-family: 'Courier New',Courier,monospace;\"><span style=\"font-size: small;\">Set regEx = New RegExp<\/span><\/div>\n<div style=\"font-family: 'Courier New',Courier,monospace; text-align: justify;\"><span style=\"font-size: small;\">regEx.Pattern = &#8220;test&#8221;<\/span><\/div>\n<div style=\"font-family: 'Courier New',Courier,monospace; text-align: justify;\">\n<p><span style=\"font-size: small;\">regEx.Global = True<\/span><\/p>\n<p><span style=\"font-size: small;\">\u00a0 \u00a0\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 <\/span><\/p>\n<\/div>\n<div style=\"font-family: 'Courier New',Courier,monospace; text-align: justify;\">\n<div style=\"text-align: left;\"><span style=\"font-size: small;\">Set objResult = regEx.Execute(&#8220;test testing tested&#8221;) \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 \u00a0\u00a0 <\/span><\/div>\n<p><span style=\"font-size: small;\"> msgbox objResult.Count<\/span><\/p>\n<\/div>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<div style=\"font-family: Verdana,sans-serif; text-align: justify;\">\n<p>b) Replace Method:<\/p>\n<p>Replace method replaces the text found in a regular expression search. The method takes 2 parameters &#8211;<\/p>\n<\/div>\n<div id=\"syntaxCodeBlocks\" class=\"code\">\n<table width=\"465\" cellspacing=\"0\" cellpadding=\"0\">\n<tbody>\n<tr>\n<td>\n<pre><span style=\"font-size: small;\">object<strong>.Replace(<\/strong>string1, string2)<\/span><\/pre>\n<pre><em>string1 - the string in which the text needs to be replaced<\/em><em><\/em><\/pre>\n<pre><em><span style=\"font-family: 'Courier New',Courier,monospace;\">string2 - the replacement string<\/span><\/em><\/pre>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<table style=\"border: 1px solid #000000;\" border=\"0\">\n<tbody>\n<tr bgcolor=\"#E0E0E0\">\n<td>\n<div style=\"font-family: 'Courier New',Courier,monospace;\"><span style=\"font-size: small;\">str1 = &#8220;long longer longest&#8221;<\/span><\/div>\n<div style=\"font-family: 'Courier New',Courier,monospace;\"><span style=\"font-size: small;\">str2 = &#8220;short&#8221;<\/span><\/div>\n<div style=\"font-family: 'Courier New',Courier,monospace;\"><span style=\"font-size: small;\">Set regEx = New RegExp<\/span><\/div>\n<div style=\"font-family: 'Courier New',Courier,monospace; text-align: justify;\"><span style=\"font-size: small;\">regEx.Pattern = &#8220;long&#8221;<\/span><\/div>\n<div style=\"font-family: 'Courier New',Courier,monospace; text-align: justify;\">\n<p><span style=\"font-size: small;\">regEx.Global = True\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 <\/span><\/p>\n<\/div>\n<div style=\"font-family: 'Courier New',Courier,monospace; text-align: justify;\"><span style=\"font-size: small;\">sReplace = regEx.Replace(str1, str2)<\/span><\/div>\n<div style=\"font-family: 'Courier New',Courier,monospace; text-align: justify;\"><span style=\"font-size: small;\">msgbox sReplace\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 <\/span><\/div>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<div style=\"font-family: Verdana,sans-serif; text-align: justify;\">\n<p><em>In this example, the text &#8216;long&#8217; is replaced by &#8216;short&#8217; and the msgbox returns short shorter shortest<\/em><\/p>\n<\/div>\n<div style=\"font-family: Verdana,sans-serif; text-align: justify;\"><span style=\"text-decoration: underline;\">c) Test Method:<\/span> This method executes a regular expression search against a specified string and returns a Boolean value which indicates if a pattern match was found or not. The method returns True if a pattern match is found; False if no match is found.<\/div>\n<table style=\"border: 1px solid #000000;\" width=\"530\" border=\"0\">\n<tbody>\n<tr bgcolor=\"#E0E0E0\">\n<td>\n<div style=\"font-family: 'Courier New',Courier,monospace;\"><span style=\"font-size: small;\">Set regEx = New RegExp<\/span><\/div>\n<div style=\"font-family: 'Courier New',Courier,monospace; text-align: justify;\"><span style=\"font-size: small;\">regEx.Pattern = &#8220;test&#8221;<\/span><\/div>\n<div style=\"font-family: 'Courier New',Courier,monospace; text-align: justify;\">\n<p><span style=\"font-size: small;\">regEx.Global = True\u00a0\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 <\/span><\/p>\n<\/div>\n<div style=\"font-family: 'Courier New',Courier,monospace; text-align: justify;\">\n<div style=\"text-align: left;\"><span style=\"font-size: small;\">msgbox regEx.Test(&#8220;test testing tested&#8221;) \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0\u00a0 \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 \u00a0\u00a0 <\/span><\/div>\n<p>&nbsp;<\/p>\n<\/div>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<div style=\"font-family: Verdana,sans-serif; text-align: justify;\">\n<p><em>In this example, the msgbox returns the Boolean value True as the pattern match is found.<\/em><\/p>\n<p>&nbsp;<\/p>\n<\/div>\n<div style=\"font-family: Verdana,sans-serif; text-align: justify;\">Want to learn more about Regular Expressions in QTP? Check &#8211;<\/div>\n<div style=\"font-family: Verdana,sans-serif; text-align: justify;\"><a title=\"All About Regular Expressions in QTP\" href=\"http:\/\/www.automationrepository.com\/2011\/08\/all-about-regular-expressions-in-qtp\/\">this<\/a> link for various regular expression patterns &amp;<\/div>\n<div style=\"font-family: Verdana,sans-serif; text-align: justify;\"><a title=\"How To Use Regular Expression Evaluator in QTP 11\" href=\"http:\/\/www.automationrepository.com\/2011\/08\/how-to-use-regular-expression-evaluator-in-qtp-11\/\">this<\/a> link on how to use Regular Expression evaluator in QTP 11.<\/div>\n<div style=\"font-family: Verdana,sans-serif; text-align: justify;\">Thanks <a href=\"http:\/\/www.joecolantonio.com\/2011\/02\/14\/qtp-regexp\/\">Joe Colantonio<\/a>, for providing the idea for this post.<\/div>\n<\/div>\n<\/div>\n<p>&nbsp;<\/p>\n<div style=\"font-family: Verdana,sans-serif; border: 1px solid #C8B560; padding: 3mm; background: #FFF8C6; text-align: center;\">\n<p>If you enjoyed this article, you can join our blog to get free email updates directly in your inbox.<\/p>\n<form style=\"text-align: center;\" action=\"http:\/\/feedburner.google.com\/fb\/a\/mailverify\" method=\"post\" onsubmit=\"window.open('http:\/\/feedburner.google.com\/fb\/a\/mailverify?uri=automationrepository\/feeds', 'popupwindow', 'scrollbars=yes,width=550,height=520');return true\" target=\"popupwindow\"><input style=\"width: 160px; height: 24px;\" onfocus=\"if (this.value == 'Enter Your Email Address') {this.value = '';}\" onblur=\"if (this.value == '') {this.value = 'Enter Your Email Address';}\" type=\"text\" value=\"Enter Your Email Address\" \/> <input type=\"hidden\" name=\"uri\" value=\"automationrepository\/feeds\" \/> <input type=\"hidden\" name=\"loc\" value=\"en_US\" \/> <input type=\"submit\" value=\"Subscribe\" \/><\/p>\n<p style=\"text-align: justify;\">\n<\/form>\n<\/div>\n<div class=\"blogger-post-footer\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/blogger.googleusercontent.com\/tracker\/413641991742395715-1635635500179055170?l=www.automationrepository.com\" alt=\"\" width=\"1\" height=\"1\" \/><\/div>\n","protected":false},"excerpt":{"rendered":"<p>Did you ever encounter a situation where you needed to search a sub-string inside a string? Of course InStr() is a great function which helps users solve this problem. But what happens when the sub-string you want to search contains a regular expression?<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[6,9],"tags":[16,15],"class_list":["post-14","post","type-post","status-publish","format-standard","hentry","category-not-so-common-stuff","category-qtp-concepts","tag-regexp","tag-regular-expressions"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v24.2 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>RegExp Object: An Alternative to InStr() Function ? - XX<\/title>\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.automationrepository.com\/wordpress\/2011\/08\/all-about-regexp-object\/\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Anish Pillai\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"3 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.automationrepository.com\/wordpress\/2011\/08\/all-about-regexp-object\/\",\"url\":\"https:\/\/www.automationrepository.com\/wordpress\/2011\/08\/all-about-regexp-object\/\",\"name\":\"RegExp Object: An Alternative to InStr() Function ? - XX\",\"isPartOf\":{\"@id\":\"https:\/\/www.automationrepository.com\/wordpress\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/www.automationrepository.com\/wordpress\/2011\/08\/all-about-regexp-object\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/www.automationrepository.com\/wordpress\/2011\/08\/all-about-regexp-object\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/blogger.googleusercontent.com\/tracker\/413641991742395715-1635635500179055170?l=www.automationrepository.com\",\"datePublished\":\"2011-08-28T16:55:00+00:00\",\"dateModified\":\"2011-10-08T18:56:20+00:00\",\"author\":{\"@id\":\"https:\/\/www.automationrepository.com\/wordpress\/#\/schema\/person\/9fb56e00b93c7e939604cdfb05d62078\"},\"breadcrumb\":{\"@id\":\"https:\/\/www.automationrepository.com\/wordpress\/2011\/08\/all-about-regexp-object\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.automationrepository.com\/wordpress\/2011\/08\/all-about-regexp-object\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.automationrepository.com\/wordpress\/2011\/08\/all-about-regexp-object\/#primaryimage\",\"url\":\"https:\/\/blogger.googleusercontent.com\/tracker\/413641991742395715-1635635500179055170?l=www.automationrepository.com\",\"contentUrl\":\"https:\/\/blogger.googleusercontent.com\/tracker\/413641991742395715-1635635500179055170?l=www.automationrepository.com\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.automationrepository.com\/wordpress\/2011\/08\/all-about-regexp-object\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/www.automationrepository.com\/wordpress\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"RegExp Object: An Alternative to InStr() Function ?\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.automationrepository.com\/wordpress\/#website\",\"url\":\"https:\/\/www.automationrepository.com\/wordpress\/\",\"name\":\"XX\",\"description\":\"\\r\\nasas\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.automationrepository.com\/wordpress\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.automationrepository.com\/wordpress\/#\/schema\/person\/9fb56e00b93c7e939604cdfb05d62078\",\"name\":\"Anish Pillai\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.automationrepository.com\/wordpress\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/?s=96&d=mm&r=g\",\"caption\":\"Anish Pillai\"},\"url\":\"https:\/\/www.automationrepository.com\/wordpress\/author\/anish-pillai\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"RegExp Object: An Alternative to InStr() Function ? - XX","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.automationrepository.com\/wordpress\/2011\/08\/all-about-regexp-object\/","twitter_misc":{"Written by":"Anish Pillai","Est. reading time":"3 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/www.automationrepository.com\/wordpress\/2011\/08\/all-about-regexp-object\/","url":"https:\/\/www.automationrepository.com\/wordpress\/2011\/08\/all-about-regexp-object\/","name":"RegExp Object: An Alternative to InStr() Function ? - XX","isPartOf":{"@id":"https:\/\/www.automationrepository.com\/wordpress\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.automationrepository.com\/wordpress\/2011\/08\/all-about-regexp-object\/#primaryimage"},"image":{"@id":"https:\/\/www.automationrepository.com\/wordpress\/2011\/08\/all-about-regexp-object\/#primaryimage"},"thumbnailUrl":"https:\/\/blogger.googleusercontent.com\/tracker\/413641991742395715-1635635500179055170?l=www.automationrepository.com","datePublished":"2011-08-28T16:55:00+00:00","dateModified":"2011-10-08T18:56:20+00:00","author":{"@id":"https:\/\/www.automationrepository.com\/wordpress\/#\/schema\/person\/9fb56e00b93c7e939604cdfb05d62078"},"breadcrumb":{"@id":"https:\/\/www.automationrepository.com\/wordpress\/2011\/08\/all-about-regexp-object\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.automationrepository.com\/wordpress\/2011\/08\/all-about-regexp-object\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.automationrepository.com\/wordpress\/2011\/08\/all-about-regexp-object\/#primaryimage","url":"https:\/\/blogger.googleusercontent.com\/tracker\/413641991742395715-1635635500179055170?l=www.automationrepository.com","contentUrl":"https:\/\/blogger.googleusercontent.com\/tracker\/413641991742395715-1635635500179055170?l=www.automationrepository.com"},{"@type":"BreadcrumbList","@id":"https:\/\/www.automationrepository.com\/wordpress\/2011\/08\/all-about-regexp-object\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.automationrepository.com\/wordpress\/"},{"@type":"ListItem","position":2,"name":"RegExp Object: An Alternative to InStr() Function ?"}]},{"@type":"WebSite","@id":"https:\/\/www.automationrepository.com\/wordpress\/#website","url":"https:\/\/www.automationrepository.com\/wordpress\/","name":"XX","description":"\r\nasas","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.automationrepository.com\/wordpress\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Person","@id":"https:\/\/www.automationrepository.com\/wordpress\/#\/schema\/person\/9fb56e00b93c7e939604cdfb05d62078","name":"Anish Pillai","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.automationrepository.com\/wordpress\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/?s=96&d=mm&r=g","caption":"Anish Pillai"},"url":"https:\/\/www.automationrepository.com\/wordpress\/author\/anish-pillai\/"}]}},"_links":{"self":[{"href":"https:\/\/www.automationrepository.com\/wordpress\/wp-json\/wp\/v2\/posts\/14","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.automationrepository.com\/wordpress\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.automationrepository.com\/wordpress\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.automationrepository.com\/wordpress\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.automationrepository.com\/wordpress\/wp-json\/wp\/v2\/comments?post=14"}],"version-history":[{"count":8,"href":"https:\/\/www.automationrepository.com\/wordpress\/wp-json\/wp\/v2\/posts\/14\/revisions"}],"predecessor-version":[{"id":523,"href":"https:\/\/www.automationrepository.com\/wordpress\/wp-json\/wp\/v2\/posts\/14\/revisions\/523"}],"wp:attachment":[{"href":"https:\/\/www.automationrepository.com\/wordpress\/wp-json\/wp\/v2\/media?parent=14"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.automationrepository.com\/wordpress\/wp-json\/wp\/v2\/categories?post=14"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.automationrepository.com\/wordpress\/wp-json\/wp\/v2\/tags?post=14"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}