{"id":1016,"date":"2023-09-26T16:38:57","date_gmt":"2023-09-26T08:38:57","guid":{"rendered":"https:\/\/www.ruianding.com\/blog\/?p=1016"},"modified":"2023-11-07T10:38:27","modified_gmt":"2023-11-07T02:38:27","slug":"regex-cheatsheet","status":"publish","type":"post","link":"https:\/\/www.ruianding.com\/blog\/regex-cheatsheet\/","title":{"rendered":"RegEx Cheatsheet"},"content":{"rendered":"\n<p class=\"has-pale-cyan-blue-background-color has-background has-small-font-size\"><strong>Study Reference:<\/strong> <a href=\"https:\/\/github.com\/ziishaned\/learn-regex\/tree\/master\/translations\" target=\"_blank\" rel=\"noreferrer noopener\">learn-regex\/translations at master \u00b7 ziishaned\/learn-regex \u00b7 GitHub<\/a><br><strong>RegEx Online Test Tool:<\/strong><a rel=\"noreferrer noopener\" href=\"https:\/\/regex101.com\/\" target=\"_blank\"> https:\/\/regex101.com\/<\/a><\/p>\n\n\n\n<h3 class=\"wp-block-heading\">What is RegEx?<\/h3>\n\n\n\n<blockquote class=\"wp-block-quote is-layout-flow wp-block-quote-is-layout-flow\">\n<p class=\"has-small-font-size\">A regular expression is a group of characters or symbols which is used to find a specific pattern in a text.<\/p>\n<\/blockquote>\n\n\n\n<p>A regex is like a special pattern we look for in a bunch of letters. <strong>We use it to do things like changing words in a sentence, checking if a form is filled out correctly, or finding a part of a sentence that follows a certain pattern.<\/strong> Instead of saying &#8220;regular expression,&#8221; we often just say &#8220;regex&#8221; or &#8220;regexp&#8221; because it&#8217;s shorter.<\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h3 class=\"wp-block-heading\">1. Basic Matchers<\/h3>\n\n\n\n<p>A regular expression is just a pattern of characters that we use to perform a search in a text. For example, the regular expression <code>cat<\/code> means: the letter <code>c<\/code>, followed by the letter <code>a<\/code>, followed by the letter <code>t<\/code>.<\/p>\n\n\n\n<p>Regular expressions are normally <strong>case-sensitive<\/strong>, so the regular expression <code>Cat<\/code> would not match the string <code>cat<\/code>.<\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h3 class=\"wp-block-heading\">2. Meta Characters<\/h3>\n\n\n\n<p>Meta characters are like the ingredients we use to make regular expressions. They don&#8217;t represent themselves, but they have special meanings and are used in a unique way.<\/p>\n\n\n\n<h4 class=\"wp-block-heading\">2.1 Quantifiers<\/h4>\n\n\n\n<figure class=\"wp-block-table is-style-stripes has-small-font-size\"><table><tbody><tr><td><strong>Meta Characters<\/strong><\/td><td><strong>Descriptions<\/strong><\/td><\/tr><tr><td>? <\/td><td>Makes the preceding symbol optional.<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<p><strong>E.g.,<\/strong> The regular expression <code>used?<\/code> is used to match strings that contain either <code>use<\/code> or <code>used<\/code>. The question mark <code>?<\/code> specifies that the preceding character or group (in this case, <code>d<\/code>) is <strong>optional<\/strong>, meaning it can occur <strong>zero<\/strong> or <strong>one<\/strong> time.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full is-resized\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.ruianding.com\/blog\/wp-content\/uploads\/2023\/09\/image-6.png\" alt=\"\" class=\"wp-image-1035\" width=\"701\" height=\"302\"\/><\/figure>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity is-style-dots\"\/>\n\n\n\n<figure class=\"wp-block-table is-style-stripes has-small-font-size\"><table><tbody><tr><td><strong>Meta Characters<\/strong><\/td><td><strong>Descriptions<\/strong><\/td><\/tr><tr><td>*<\/td><td>Matches 0 or more repetitions of the preceding symbol.<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<p><strong>E.g.,<\/strong> The regular expression <code>ca*t<\/code> is used to match strings that start with <code>c<\/code>, followed by <strong>zero<\/strong> or <strong>more occurrences<\/strong> of the character <code>a<\/code>, and ending with the character <code>t<\/code>. In this regular expression <code>a<\/code> can be absent or repeated any number of times.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full is-resized\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.ruianding.com\/blog\/wp-content\/uploads\/2023\/09\/image-7.png\" alt=\"\" class=\"wp-image-1038\" width=\"698\" height=\"275\"\/><\/figure>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity is-style-dots\"\/>\n\n\n\n<figure class=\"wp-block-table is-style-stripes has-small-font-size\"><table><tbody><tr><td><strong>Meta Characters<\/strong><\/td><td><strong>Descriptions<\/strong><\/td><\/tr><tr><td>+<\/td><td>Matches 1 or more repetitions of the preceding symbol.<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<p><strong>E.g.,<\/strong> The regular expression <code>ca+t<\/code> is used to match strings that start with <code>c<\/code>, followed by <strong>one<\/strong> or <strong>more occurrences<\/strong> of the character <code>a<\/code>, and ending with the character <code>t<\/code>. It will not match strings that have zero <code>a<\/code> character between <code>c<\/code> and <code>t<\/code>.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full is-resized\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.ruianding.com\/blog\/wp-content\/uploads\/2023\/10\/image-1.png\" alt=\"\" class=\"wp-image-1045\" width=\"698\" height=\"270\"\/><\/figure>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity is-style-dots\"\/>\n\n\n\n<figure class=\"wp-block-table is-style-stripes has-small-font-size\"><table><tbody><tr><td><strong>Meta Characters<\/strong><\/td><td><strong>Descriptions<\/strong><\/td><\/tr><tr><td>{n,m}<\/td><td>Braces. Matches at least &#8220;n&#8221; but not more than &#8220;m&#8221; repetitions of the preceding symbol.<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<p><strong>E.g., <\/strong>Regular expression <code>ca{6,7}t<\/code> will match strings like <code>caaaaaat<\/code> (6 <code>a<\/code> characters) and <code>caaaaaaat<\/code> (7 <code>a<\/code> characters). It will not match strings with fewer than 6 or more than 7 <code>a<\/code> characters between <code>c<\/code> and <code>t<\/code>.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full is-resized\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.ruianding.com\/blog\/wp-content\/uploads\/2023\/10\/image-2.png\" alt=\"\" class=\"wp-image-1050\" width=\"674\" height=\"227\"\/><\/figure>\n\n\n\n<p class=\"has-pale-cyan-blue-background-color has-background has-small-font-size\">It can also be written as <code>ca{n}t<\/code> with exact match &#8220;n&#8221; repetitions of the preceding symbol.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full is-resized\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.ruianding.com\/blog\/wp-content\/uploads\/2023\/10\/image-3.png\" alt=\"\" class=\"wp-image-1052\" width=\"679\" height=\"232\"\/><\/figure>\n\n\n\n<p class=\"has-pale-cyan-blue-background-color has-background has-small-font-size\">Further it can be implemented like <code>ca{n,}t<\/code> with exact match &#8220;n&#8221; or more occurrences of the character greater than &#8220;n&#8221; repetitions of the preceding symbol.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full is-resized\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.ruianding.com\/blog\/wp-content\/uploads\/2023\/10\/image-4.png\" alt=\"\" class=\"wp-image-1054\" width=\"677\" height=\"225\"\/><\/figure>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity is-style-dots\"\/>\n\n\n\n<h4 class=\"wp-block-heading\">2.2 Group<\/h4>\n\n\n\n<figure class=\"wp-block-table is-style-stripes has-small-font-size\"><table><tbody><tr><td><strong>Meta Characters<\/strong><\/td><td><strong>Descriptions<\/strong><\/td><\/tr><tr><td>(xyz)<\/td><td>Character group. Matches the characters xyz in that exact order.<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<p><strong>E.g., <\/strong>Regular expression <code>(ca){2}t<\/code> is used to match strings that have the pattern <code>ca<\/code> repeated exactly two times consecutively.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full is-resized\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.ruianding.com\/blog\/wp-content\/uploads\/2023\/10\/image-5.png\" alt=\"\" class=\"wp-image-1056\" width=\"678\" height=\"251\"\/><\/figure>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity is-style-dots\"\/>\n\n\n\n<h4 class=\"wp-block-heading\">2.3 Alternation (OR Operator)<\/h4>\n\n\n\n<figure class=\"wp-block-table is-style-stripes has-small-font-size\"><table><tbody><tr><td><strong>Meta Characters<\/strong><\/td><td><strong>Descriptions<\/strong><\/td><\/tr><tr><td>|<\/td><td>Alternation. Matches either the characters before or the characters after the symbol.<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<figure class=\"wp-block-image size-full is-resized\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.ruianding.com\/blog\/wp-content\/uploads\/2023\/10\/image-6.png\" alt=\"\" class=\"wp-image-1059\" width=\"677\" height=\"274\"\/><\/figure>\n\n\n\n<p><strong>E.g., <\/strong>The regular expression <code>a (cat|dog)<\/code> is used to match strings that contain the letter <code>a<\/code> followed by a space and then <strong>either<\/strong> the word <code>cat<\/code> or the word <code>dog<\/code>.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full is-resized\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.ruianding.com\/blog\/wp-content\/uploads\/2023\/10\/image-7.png\" alt=\"\" class=\"wp-image-1060\" width=\"674\" height=\"275\"\/><\/figure>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity is-style-dots\"\/>\n\n\n\n<h4 class=\"wp-block-heading\">2.4 Character Classes<\/h4>\n\n\n\n<p>Character classes are also called Character Sets. Square brackets <code>[]<\/code> are used to specify character sets. Use a hyphen inside a character set to specify the characters&#8217; range.<strong> <\/strong><\/p>\n\n\n\n<p class=\"has-luminous-vivid-amber-background-color has-background has-small-font-size\">The order of the character range inside the square brackets doesn&#8217;t matter.<\/p>\n\n\n\n<p><strong>E.g.,<\/strong> <code>[Tt]he<\/code>&nbsp;means: an uppercase&nbsp;<code>T<\/code>&nbsp;or lowercase&nbsp;<code>t<\/code>, followed by the letter&nbsp;<code>h<\/code>, followed by the letter&nbsp;<code>e<\/code>.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full is-resized\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.ruianding.com\/blog\/wp-content\/uploads\/2023\/10\/image-8.png\" alt=\"\" class=\"wp-image-1075\" width=\"674\" height=\"253\"\/><\/figure>\n\n\n\n<p class=\"has-pale-cyan-blue-background-color has-background has-small-font-size\">The following <code>[a-z]<\/code> matches a single character in the range between&nbsp;<strong>a<\/strong>&nbsp;and <strong>z<\/strong> in lower case.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full is-resized\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.ruianding.com\/blog\/wp-content\/uploads\/2023\/10\/image-9.png\" alt=\"\" class=\"wp-image-1077\" width=\"674\" height=\"253\"\/><\/figure>\n\n\n\n<h5 class=\"wp-block-heading\"><strong>2.4.1 Neglated Character Classes<\/strong><\/h5>\n\n\n\n<p>In general, the caret symbol <code>^<\/code> represents the start of the string, but when it is typed after the opening square bracket <strong>it negates the character class.<\/strong><\/p>\n\n\n\n<p><strong>E.g.<\/strong>, the expression <code>[^c]ar<\/code> means any character except <code>c<\/code> followed by <code>ar<\/code>.In other words, it matches any word that contains with <strong>ar<\/strong> but doesn&#8217;t start with the letter <strong>c<\/strong>.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full is-resized\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.ruianding.com\/blog\/wp-content\/uploads\/2023\/10\/image-11.png\" alt=\"\" class=\"wp-image-1081\" width=\"676\" height=\"297\"\/><\/figure>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h3 class=\"wp-block-heading\">3. Shorthand Character Sets<\/h3>\n\n\n\n<figure class=\"wp-block-table is-style-stripes has-small-font-size\"><table><tbody><tr><td><strong>Shorthand<\/strong><\/td><td><strong>Description<\/strong><\/td><\/tr><tr><td>.<\/td><td>Any character except new line<\/td><\/tr><tr><td>\\w<\/td><td>Matches alphanumeric characters:&nbsp;<code>[a-zA-Z0-9_]<\/code><\/td><\/tr><tr><td>\\W<\/td><td>Matches non-alphanumeric characters:&nbsp;<code>[^\\w]<\/code><\/td><\/tr><tr><td>\\d<\/td><td>Matches digits:&nbsp;<code>[0-9]<\/code><\/td><\/tr><tr><td>\\D<\/td><td>Matches non-digits:&nbsp;<code>[^\\d]<\/code><\/td><\/tr><tr><td>\\s<\/td><td>Matches whitespace characters:&nbsp;<code>[\\t\\n\\f\\r\\p{Z}]<\/code><\/td><\/tr><tr><td>\\S<\/td><td>Matches non-whitespace characters:&nbsp;<code>[^\\s]<\/code><\/td><\/tr><\/tbody><\/table><\/figure>\n","protected":false},"excerpt":{"rendered":"<p>Study Reference: learn-regex\/translations at master \u00b7 ziishaned\/learn-regex \u00b7 GitHubRegEx Online Test Tool: https:\/\/regex101.com\/ What is RegEx? A regular expression is a group of characters or symbols which is used to find a specific pattern in a text. A regex is like a special pattern we look for in a bunch of letters. We use it [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_themeisle_gutenberg_block_has_review":false,"footnotes":""},"categories":[1],"tags":[],"class_list":["post-1016","post","type-post","status-publish","format-standard","hentry","category-miscellaneous"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.0 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>RegEx Cheatsheet - \u6781\u7b80IT\uff5cSimpleIT<\/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.ruianding.com\/blog\/regex-cheatsheet\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"RegEx Cheatsheet - \u6781\u7b80IT\uff5cSimpleIT\" \/>\n<meta property=\"og:description\" content=\"Study Reference: learn-regex\/translations at master \u00b7 ziishaned\/learn-regex \u00b7 GitHubRegEx Online Test Tool: https:\/\/regex101.com\/ What is RegEx? A regular expression is a group of characters or symbols which is used to find a specific pattern in a text. A regex is like a special pattern we look for in a bunch of letters. We use it [&hellip;]\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.ruianding.com\/blog\/regex-cheatsheet\/\" \/>\n<meta property=\"og:site_name\" content=\"\u6781\u7b80IT\uff5cSimpleIT\" \/>\n<meta property=\"article:published_time\" content=\"2023-09-26T08:38:57+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2023-11-07T02:38:27+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.ruianding.com\/blog\/wp-content\/uploads\/2023\/09\/image-6.png\" \/>\n\t<meta property=\"og:image:width\" content=\"935\" \/>\n\t<meta property=\"og:image:height\" content=\"402\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/png\" \/>\n<meta name=\"author\" content=\"Ruian Ding\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Ruian Ding\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"4 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/www.ruianding.com\/blog\/regex-cheatsheet\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/www.ruianding.com\/blog\/regex-cheatsheet\/\"},\"author\":{\"name\":\"Ruian Ding\",\"@id\":\"https:\/\/www.ruianding.com\/blog\/#\/schema\/person\/440d88575b7dc819a4cefc8c4199db3b\"},\"headline\":\"RegEx Cheatsheet\",\"datePublished\":\"2023-09-26T08:38:57+00:00\",\"dateModified\":\"2023-11-07T02:38:27+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/www.ruianding.com\/blog\/regex-cheatsheet\/\"},\"wordCount\":671,\"publisher\":{\"@id\":\"https:\/\/www.ruianding.com\/blog\/#\/schema\/person\/440d88575b7dc819a4cefc8c4199db3b\"},\"image\":{\"@id\":\"https:\/\/www.ruianding.com\/blog\/regex-cheatsheet\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/www.ruianding.com\/blog\/wp-content\/uploads\/2023\/09\/image-6.png\",\"articleSection\":[\"Miscellaneous\"],\"inLanguage\":\"en-US\"},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.ruianding.com\/blog\/regex-cheatsheet\/\",\"url\":\"https:\/\/www.ruianding.com\/blog\/regex-cheatsheet\/\",\"name\":\"RegEx Cheatsheet - \u6781\u7b80IT\uff5cSimpleIT\",\"isPartOf\":{\"@id\":\"https:\/\/www.ruianding.com\/blog\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/www.ruianding.com\/blog\/regex-cheatsheet\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/www.ruianding.com\/blog\/regex-cheatsheet\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/www.ruianding.com\/blog\/wp-content\/uploads\/2023\/09\/image-6.png\",\"datePublished\":\"2023-09-26T08:38:57+00:00\",\"dateModified\":\"2023-11-07T02:38:27+00:00\",\"breadcrumb\":{\"@id\":\"https:\/\/www.ruianding.com\/blog\/regex-cheatsheet\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.ruianding.com\/blog\/regex-cheatsheet\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.ruianding.com\/blog\/regex-cheatsheet\/#primaryimage\",\"url\":\"https:\/\/www.ruianding.com\/blog\/wp-content\/uploads\/2023\/09\/image-6.png\",\"contentUrl\":\"https:\/\/www.ruianding.com\/blog\/wp-content\/uploads\/2023\/09\/image-6.png\",\"width\":935,\"height\":402},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.ruianding.com\/blog\/regex-cheatsheet\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/www.ruianding.com\/blog\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"RegEx Cheatsheet\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.ruianding.com\/blog\/#website\",\"url\":\"https:\/\/www.ruianding.com\/blog\/\",\"name\":\"Ruian's Tech Troubleshooting Toolbox\",\"description\":\"Debug the World.\",\"publisher\":{\"@id\":\"https:\/\/www.ruianding.com\/blog\/#\/schema\/person\/440d88575b7dc819a4cefc8c4199db3b\"},\"alternateName\":\"\u4e01\u777f\u5b89\u7684\u6280\u672f\u5206\u4eab\u535a\u5ba2\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.ruianding.com\/blog\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":[\"Person\",\"Organization\"],\"@id\":\"https:\/\/www.ruianding.com\/blog\/#\/schema\/person\/440d88575b7dc819a4cefc8c4199db3b\",\"name\":\"Ruian Ding\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.ruianding.com\/blog\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/www.ruianding.com\/blog\/wp-content\/uploads\/2023\/05\/logo.png\",\"contentUrl\":\"https:\/\/www.ruianding.com\/blog\/wp-content\/uploads\/2023\/05\/logo.png\",\"width\":284,\"height\":284,\"caption\":\"Ruian Ding\"},\"logo\":{\"@id\":\"https:\/\/www.ruianding.com\/blog\/#\/schema\/person\/image\/\"},\"description\":\"I am currently a Support Specialist at NIO, focusing on cloud-related issues for NIO Power. Previously, at Microsoft Entra ID, I specialized in identity and access management (IAM), including device registration, Windows Hello for Business (WHfB), multi-factor authentication (MFA), and single sign-on (SSO). In addition to my core expertise, I have a strong foundation in Active Directory, Servers, Cloud Computing, Network Administration, and Front-end Web Development. This diverse technical skill set enables me to effectively handle a wide range of challenges in a fast-paced IT environment.\",\"sameAs\":[\"https:\/\/www.ruianding.com\"],\"url\":\"https:\/\/www.ruianding.com\/blog\/author\/ruiand\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"RegEx Cheatsheet - \u6781\u7b80IT\uff5cSimpleIT","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.ruianding.com\/blog\/regex-cheatsheet\/","og_locale":"en_US","og_type":"article","og_title":"RegEx Cheatsheet - \u6781\u7b80IT\uff5cSimpleIT","og_description":"Study Reference: learn-regex\/translations at master \u00b7 ziishaned\/learn-regex \u00b7 GitHubRegEx Online Test Tool: https:\/\/regex101.com\/ What is RegEx? A regular expression is a group of characters or symbols which is used to find a specific pattern in a text. A regex is like a special pattern we look for in a bunch of letters. We use it [&hellip;]","og_url":"https:\/\/www.ruianding.com\/blog\/regex-cheatsheet\/","og_site_name":"\u6781\u7b80IT\uff5cSimpleIT","article_published_time":"2023-09-26T08:38:57+00:00","article_modified_time":"2023-11-07T02:38:27+00:00","og_image":[{"width":935,"height":402,"url":"https:\/\/www.ruianding.com\/blog\/wp-content\/uploads\/2023\/09\/image-6.png","type":"image\/png"}],"author":"Ruian Ding","twitter_card":"summary_large_image","twitter_misc":{"Written by":"Ruian Ding","Est. reading time":"4 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.ruianding.com\/blog\/regex-cheatsheet\/#article","isPartOf":{"@id":"https:\/\/www.ruianding.com\/blog\/regex-cheatsheet\/"},"author":{"name":"Ruian Ding","@id":"https:\/\/www.ruianding.com\/blog\/#\/schema\/person\/440d88575b7dc819a4cefc8c4199db3b"},"headline":"RegEx Cheatsheet","datePublished":"2023-09-26T08:38:57+00:00","dateModified":"2023-11-07T02:38:27+00:00","mainEntityOfPage":{"@id":"https:\/\/www.ruianding.com\/blog\/regex-cheatsheet\/"},"wordCount":671,"publisher":{"@id":"https:\/\/www.ruianding.com\/blog\/#\/schema\/person\/440d88575b7dc819a4cefc8c4199db3b"},"image":{"@id":"https:\/\/www.ruianding.com\/blog\/regex-cheatsheet\/#primaryimage"},"thumbnailUrl":"https:\/\/www.ruianding.com\/blog\/wp-content\/uploads\/2023\/09\/image-6.png","articleSection":["Miscellaneous"],"inLanguage":"en-US"},{"@type":"WebPage","@id":"https:\/\/www.ruianding.com\/blog\/regex-cheatsheet\/","url":"https:\/\/www.ruianding.com\/blog\/regex-cheatsheet\/","name":"RegEx Cheatsheet - \u6781\u7b80IT\uff5cSimpleIT","isPartOf":{"@id":"https:\/\/www.ruianding.com\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.ruianding.com\/blog\/regex-cheatsheet\/#primaryimage"},"image":{"@id":"https:\/\/www.ruianding.com\/blog\/regex-cheatsheet\/#primaryimage"},"thumbnailUrl":"https:\/\/www.ruianding.com\/blog\/wp-content\/uploads\/2023\/09\/image-6.png","datePublished":"2023-09-26T08:38:57+00:00","dateModified":"2023-11-07T02:38:27+00:00","breadcrumb":{"@id":"https:\/\/www.ruianding.com\/blog\/regex-cheatsheet\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.ruianding.com\/blog\/regex-cheatsheet\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.ruianding.com\/blog\/regex-cheatsheet\/#primaryimage","url":"https:\/\/www.ruianding.com\/blog\/wp-content\/uploads\/2023\/09\/image-6.png","contentUrl":"https:\/\/www.ruianding.com\/blog\/wp-content\/uploads\/2023\/09\/image-6.png","width":935,"height":402},{"@type":"BreadcrumbList","@id":"https:\/\/www.ruianding.com\/blog\/regex-cheatsheet\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.ruianding.com\/blog\/"},{"@type":"ListItem","position":2,"name":"RegEx Cheatsheet"}]},{"@type":"WebSite","@id":"https:\/\/www.ruianding.com\/blog\/#website","url":"https:\/\/www.ruianding.com\/blog\/","name":"Ruian's Tech Troubleshooting Toolbox","description":"Debug the World.","publisher":{"@id":"https:\/\/www.ruianding.com\/blog\/#\/schema\/person\/440d88575b7dc819a4cefc8c4199db3b"},"alternateName":"\u4e01\u777f\u5b89\u7684\u6280\u672f\u5206\u4eab\u535a\u5ba2","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.ruianding.com\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":["Person","Organization"],"@id":"https:\/\/www.ruianding.com\/blog\/#\/schema\/person\/440d88575b7dc819a4cefc8c4199db3b","name":"Ruian Ding","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.ruianding.com\/blog\/#\/schema\/person\/image\/","url":"https:\/\/www.ruianding.com\/blog\/wp-content\/uploads\/2023\/05\/logo.png","contentUrl":"https:\/\/www.ruianding.com\/blog\/wp-content\/uploads\/2023\/05\/logo.png","width":284,"height":284,"caption":"Ruian Ding"},"logo":{"@id":"https:\/\/www.ruianding.com\/blog\/#\/schema\/person\/image\/"},"description":"I am currently a Support Specialist at NIO, focusing on cloud-related issues for NIO Power. Previously, at Microsoft Entra ID, I specialized in identity and access management (IAM), including device registration, Windows Hello for Business (WHfB), multi-factor authentication (MFA), and single sign-on (SSO). In addition to my core expertise, I have a strong foundation in Active Directory, Servers, Cloud Computing, Network Administration, and Front-end Web Development. This diverse technical skill set enables me to effectively handle a wide range of challenges in a fast-paced IT environment.","sameAs":["https:\/\/www.ruianding.com"],"url":"https:\/\/www.ruianding.com\/blog\/author\/ruiand\/"}]}},"_links":{"self":[{"href":"https:\/\/www.ruianding.com\/blog\/wp-json\/wp\/v2\/posts\/1016","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.ruianding.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.ruianding.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.ruianding.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.ruianding.com\/blog\/wp-json\/wp\/v2\/comments?post=1016"}],"version-history":[{"count":35,"href":"https:\/\/www.ruianding.com\/blog\/wp-json\/wp\/v2\/posts\/1016\/revisions"}],"predecessor-version":[{"id":1084,"href":"https:\/\/www.ruianding.com\/blog\/wp-json\/wp\/v2\/posts\/1016\/revisions\/1084"}],"wp:attachment":[{"href":"https:\/\/www.ruianding.com\/blog\/wp-json\/wp\/v2\/media?parent=1016"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.ruianding.com\/blog\/wp-json\/wp\/v2\/categories?post=1016"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.ruianding.com\/blog\/wp-json\/wp\/v2\/tags?post=1016"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}