{"id":3865,"date":"2025-01-20T05:20:12","date_gmt":"2025-01-20T13:20:12","guid":{"rendered":"https:\/\/devblogs.microsoft.com\/azure-sql\/?p=3865"},"modified":"2025-01-20T05:55:35","modified_gmt":"2025-01-20T13:55:35","slug":"extending-regular-expressions-regex-support-on-azure-sql-managed-instance-mi","status":"publish","type":"post","link":"https:\/\/devblogs.microsoft.com\/azure-sql\/extending-regular-expressions-regex-support-on-azure-sql-managed-instance-mi\/","title":{"rendered":"Extending Regular Expressions (Regex) Support on Azure SQL Managed Instance (MI)"},"content":{"rendered":"<p><span class=\"TextRun SCXW34447547 BCX8\" lang=\"EN-US\" xml:lang=\"EN-US\" data-contrast=\"auto\"><span class=\"NormalTextRun CommentStart CommentHighlightPipeClicked CommentHighlightClicked SCXW34447547 BCX8\">We are <\/span><span class=\"NormalTextRun CommentHighlightClicked SCXW34447547 BCX8\">happy<\/span><span class=\"NormalTextRun CommentHighlightClicked SCXW34447547 BCX8\"> to announce the <\/span><span class=\"NormalTextRun CommentHighlightClicked SCXW34447547 BCX8\">Private Preview <\/span><span class=\"NormalTextRun CommentHighlightClicked SCXW34447547 BCX8\">of Regular Expressions (Reg<\/span><span class=\"NormalTextRun CommentHighlightClicked SCXW34447547 BCX8\">e<\/span><span class=\"NormalTextRun CommentHighlightClicked SCXW34447547 BCX8\">x) support on <\/span><\/span><a class=\"Hyperlink HyperlinkGateOff SCXW34447547 BCX8\" href=\"https:\/\/learn.microsoft.com\/en-us\/azure\/azure-sql\/managed-instance\/sql-managed-instance-paas-overview\" target=\"_blank\" rel=\"noreferrer noopener\"><span class=\"TextRun Underlined UnderlinedGateOff SCXW34447547 BCX8\" lang=\"EN-US\" xml:lang=\"EN-US\" data-contrast=\"none\"><span class=\"NormalTextRun CommentHighlightClicked SCXW34447547 BCX8\" data-ccp-charstyle=\"Hyperlink\">Azure SQL Managed Instance<\/span><\/span><\/a><span class=\"TextRun SCXW34447547 BCX8\" lang=\"EN-US\" xml:lang=\"EN-US\" data-contrast=\"auto\"><span class=\"NormalTextRun CommentHighlightClicked SCXW34447547 BCX8\"> (MI). This new feature brings powerful text processing capabilities to your SQL queries, enabling you to perform complex pattern matching and data manipulation with ease.<\/span><\/span><span class=\"EOP CommentHighlightPipeClicked SCXW34447547 BCX8\" data-ccp-props=\"{}\">\u00a0<\/span><\/p>\n<h4><span class=\"NormalTextRun SCXW26953772 BCX8\">Regex support in <\/span><span class=\"NormalTextRun SCXW26953772 BCX8\">Azure SQL<\/span><\/h4>\n<p><span data-contrast=\"auto\">The Regex feature in Azure SQL follows the\u202fPOSIX\u202fstandard and is compatible with the standard regex syntax and supports a variety of regex functions, such as\u202fREGEXP_LIKE, REGEXP_COUNT, REGEXP_INSTR, REGEXP_REPLACE,\u202fand\u202fREGEXP_SUBSTR. The feature also supports case sensitivity, character classes, quantifiers, anchors, and capturing groups.\u202f<\/span><span data-ccp-props=\"{}\">\u00a0<\/span><\/p>\n<p><span data-contrast=\"auto\">Here are the functions and features supported:<\/span><span data-ccp-props=\"{}\">\u00a0<\/span><\/p>\n<ul>\n<li data-leveltext=\"\uf0b7\" data-font=\"Symbol\" data-listid=\"5\" data-list-defn-props=\"{&quot;335552541&quot;:1,&quot;335559685&quot;:720,&quot;335559991&quot;:360,&quot;469769226&quot;:&quot;Symbol&quot;,&quot;469769242&quot;:[8226],&quot;469777803&quot;:&quot;left&quot;,&quot;469777804&quot;:&quot;\uf0b7&quot;,&quot;469777815&quot;:&quot;multilevel&quot;}\" data-aria-posinset=\"1\" data-aria-level=\"1\"><b><span data-contrast=\"auto\">REGEXP_LIKE<\/span><\/b><span data-contrast=\"auto\">: Checks if a string matches a regular expression pattern.<\/span><span data-ccp-props=\"{&quot;335559739&quot;:0}\">\u00a0<\/span><\/li>\n<\/ul>\n<ul>\n<li data-leveltext=\"\uf0b7\" data-font=\"Symbol\" data-listid=\"5\" data-list-defn-props=\"{&quot;335552541&quot;:1,&quot;335559685&quot;:720,&quot;335559991&quot;:360,&quot;469769226&quot;:&quot;Symbol&quot;,&quot;469769242&quot;:[8226],&quot;469777803&quot;:&quot;left&quot;,&quot;469777804&quot;:&quot;\uf0b7&quot;,&quot;469777815&quot;:&quot;multilevel&quot;}\" data-aria-posinset=\"2\" data-aria-level=\"1\"><b><span data-contrast=\"auto\">REGEXP_COUNT<\/span><\/b><span data-contrast=\"auto\">: Returns the number of times a pattern occurs in a string.<\/span><span data-ccp-props=\"{&quot;335559739&quot;:0}\">\u00a0<\/span><\/li>\n<\/ul>\n<ul>\n<li data-leveltext=\"\uf0b7\" data-font=\"Symbol\" data-listid=\"5\" data-list-defn-props=\"{&quot;335552541&quot;:1,&quot;335559685&quot;:720,&quot;335559991&quot;:360,&quot;469769226&quot;:&quot;Symbol&quot;,&quot;469769242&quot;:[8226],&quot;469777803&quot;:&quot;left&quot;,&quot;469777804&quot;:&quot;\uf0b7&quot;,&quot;469777815&quot;:&quot;multilevel&quot;}\" data-aria-posinset=\"3\" data-aria-level=\"1\"><b><span data-contrast=\"auto\">REGEXP_INSTR<\/span><\/b><span data-contrast=\"auto\">: Returns the position of the first or the last (based on the specified option) occurrence of a pattern in a string.<\/span><span data-ccp-props=\"{&quot;335559739&quot;:0}\">\u00a0<\/span><\/li>\n<\/ul>\n<ul>\n<li data-leveltext=\"\uf0b7\" data-font=\"Symbol\" data-listid=\"5\" data-list-defn-props=\"{&quot;335552541&quot;:1,&quot;335559685&quot;:720,&quot;335559991&quot;:360,&quot;469769226&quot;:&quot;Symbol&quot;,&quot;469769242&quot;:[8226],&quot;469777803&quot;:&quot;left&quot;,&quot;469777804&quot;:&quot;\uf0b7&quot;,&quot;469777815&quot;:&quot;multilevel&quot;}\" data-aria-posinset=\"4\" data-aria-level=\"1\"><b><span data-contrast=\"auto\">REGEXP_REPLACE<\/span><\/b><span data-contrast=\"auto\">: Replaces occurrences of a pattern in a string with another string.<\/span><span data-ccp-props=\"{&quot;335559739&quot;:0}\">\u00a0<\/span><\/li>\n<\/ul>\n<ul>\n<li data-leveltext=\"\uf0b7\" data-font=\"Symbol\" data-listid=\"5\" data-list-defn-props=\"{&quot;335552541&quot;:1,&quot;335559685&quot;:720,&quot;335559991&quot;:360,&quot;469769226&quot;:&quot;Symbol&quot;,&quot;469769242&quot;:[8226],&quot;469777803&quot;:&quot;left&quot;,&quot;469777804&quot;:&quot;\uf0b7&quot;,&quot;469777815&quot;:&quot;multilevel&quot;}\" data-aria-posinset=\"5\" data-aria-level=\"1\"><b><span data-contrast=\"auto\">REGEXP_SUBSTR<\/span><\/b><span data-contrast=\"auto\">: Extracts a substring that matches a regular expression pattern.<\/span><span data-ccp-props=\"{&quot;335559739&quot;:0}\">\u00a0<\/span><\/li>\n<\/ul>\n<p><span data-contrast=\"auto\">To start using Regex in Azure SQL MI, simply include the relevant Regex functions in your SQL queries. To learn more about the Regex functions, please visit this blog: <\/span><a href=\"https:\/\/aka.ms\/regex-prpr-blog\"><span data-contrast=\"none\">https:\/\/aka.ms\/regex-prpr-blog<\/span><\/a><span data-ccp-props=\"{}\">\u00a0<\/span><\/p>\n<h4><b><span data-contrast=\"auto\">Getting Started<\/span><\/b><span data-ccp-props=\"{}\">\u00a0<\/span><\/h4>\n<p><span data-contrast=\"auto\">To start using Regex feature in Azure SQL MI, please ensure to select \u201c<\/span><i><span data-contrast=\"auto\">Always-up-to-date<\/span><\/i><span data-contrast=\"auto\">\u201d update policy on the <\/span><i><span data-contrast=\"auto\">Additional Settings<\/span><\/i><span data-contrast=\"auto\"> tab of instance create portal blade to get access to all new SQL engine features as soon as they are available in Azure.<\/span><\/p>\n<p><a href=\"https:\/\/devblogs.microsoft.com\/azure-sql\/wp-content\/uploads\/sites\/56\/2024\/11\/MI-always-up-to-date.jpg\"><img decoding=\"async\" class=\"aligncenter wp-image-3867 size-full\" src=\"https:\/\/devblogs.microsoft.com\/azure-sql\/wp-content\/uploads\/sites\/56\/2024\/11\/MI-always-up-to-date.jpg\" alt=\"Image MI always up to date\" width=\"697\" height=\"307\" srcset=\"https:\/\/devblogs.microsoft.com\/azure-sql\/wp-content\/uploads\/sites\/56\/2024\/11\/MI-always-up-to-date.jpg 697w, https:\/\/devblogs.microsoft.com\/azure-sql\/wp-content\/uploads\/sites\/56\/2024\/11\/MI-always-up-to-date-300x132.jpg 300w\" sizes=\"(max-width: 697px) 100vw, 697px\" \/><\/a><\/p>\n<h4><b><span data-contrast=\"auto\">Join the Preview<\/span><\/b><span data-ccp-props=\"{}\">\u00a0<\/span><\/h4>\n<p><span data-contrast=\"auto\">The Regex feature is currently in private preview in Azure SQL Database and Azure SQL Managed Instance (MI). If you are interested to participate in the private preview and try out the regex feature, please fill out this form: <\/span><a href=\"https:\/\/aka.ms\/regex-preview-signup\"><span data-contrast=\"none\">https:\/\/aka.ms\/regex-preview-signup<\/span><\/a><span data-ccp-props=\"{}\">\u00a0<\/span><\/p>\n<p><span data-contrast=\"auto\">For more details, you can refer this blog &#8211; <\/span><a href=\"https:\/\/aka.ms\/regex-prpr-blog\"><span data-contrast=\"none\">https:\/\/aka.ms\/regex-prpr-blog<\/span><\/a><span data-contrast=\"auto\">,<\/span><span data-ccp-props=\"{}\">\u00a0<\/span><\/p>\n<h4><b><span data-contrast=\"auto\">Feedback<\/span><\/b><span data-ccp-props=\"{}\">\u00a0<\/span><\/h4>\n<p><span data-contrast=\"auto\">We value your feedback and suggestions as we continue to improve and enhance Azure SQL. Please share your thoughts and experiences about Regex feature with us through <\/span><a href=\"https:\/\/aka.ms\/sqldbregex-feedback\"><span data-contrast=\"none\">https:\/\/aka.ms\/sqldbregex-feedback<\/span><\/a><span data-ccp-props=\"{}\">\u00a0<\/span><\/p>\n<p><span data-contrast=\"auto\">Thank you for your continued support. We look forward to seeing how you leverage Regex to simplify and enhance your data processing tasks.<\/span><span data-ccp-props=\"{}\">\u00a0<\/span><\/p>\n","protected":false},"excerpt":{"rendered":"<p>We are happy to announce the Private Preview of Regular Expressions (Regex) support on Azure SQL Managed Instance (MI). This new feature brings powerful text processing capabilities to your SQL queries, enabling you to perform complex pattern matching and data manipulation with ease.\u00a0 Regex support in Azure SQL The Regex feature in Azure SQL follows [&hellip;]<\/p>\n","protected":false},"author":29335,"featured_media":81,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[1,619],"tags":[636,608],"class_list":["post-3865","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-azure-sql","category-t-sql","tag-azure-sql-managed-instance","tag-sql-regex-functions"],"acf":[],"blog_post_summary":"<p>We are happy to announce the Private Preview of Regular Expressions (Regex) support on Azure SQL Managed Instance (MI). This new feature brings powerful text processing capabilities to your SQL queries, enabling you to perform complex pattern matching and data manipulation with ease.\u00a0 Regex support in Azure SQL The Regex feature in Azure SQL follows [&hellip;]<\/p>\n","_links":{"self":[{"href":"https:\/\/devblogs.microsoft.com\/azure-sql\/wp-json\/wp\/v2\/posts\/3865","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/devblogs.microsoft.com\/azure-sql\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/devblogs.microsoft.com\/azure-sql\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/azure-sql\/wp-json\/wp\/v2\/users\/29335"}],"replies":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/azure-sql\/wp-json\/wp\/v2\/comments?post=3865"}],"version-history":[{"count":0,"href":"https:\/\/devblogs.microsoft.com\/azure-sql\/wp-json\/wp\/v2\/posts\/3865\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/azure-sql\/wp-json\/wp\/v2\/media\/81"}],"wp:attachment":[{"href":"https:\/\/devblogs.microsoft.com\/azure-sql\/wp-json\/wp\/v2\/media?parent=3865"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/azure-sql\/wp-json\/wp\/v2\/categories?post=3865"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/azure-sql\/wp-json\/wp\/v2\/tags?post=3865"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}