{"id":10416,"date":"2026-09-16T07:20:00","date_gmt":"2026-09-16T05:20:00","guid":{"rendered":"https:\/\/www.lukaswojcik.com\/blog\/?p=10416"},"modified":"2026-09-09T17:08:21","modified_gmt":"2026-09-09T15:08:21","slug":"regular-expressions-the-greedy-dot-missing-anchors-and-nested-repetition","status":"publish","type":"post","link":"https:\/\/www.lukaswojcik.com\/blog\/en\/web-development\/regular-expressions-the-greedy-dot-missing-anchors-and-nested-repetition\/","title":{"rendered":"Regular Expressions: The Greedy Dot, Missing Anchors and Nested Repetition"},"content":{"rendered":"<p>A regular expression is tested against the case it was written for, it matches, and it goes into production. What it does with the second case is a separate question, and the answer is often that it matches that one too &#8211; just not the part anyone intended.<\/p>\n<p>The three mistakes below are the ones that survive review, because none of them fails. They return something, the something looks plausible in a spot check, and the difference shows up as data that is subtly wrong rather than as an error.<\/p>\n<figure class=\"lw-diagram\">\n<img decoding=\"async\" src=\"https:\/\/www.lukaswojcik.com\/blog\/wp-content\/uploads\/diagrams\/treffergrenzen-en.png\" width=\"1120\" height=\"580\" loading=\"lazy\" alt=\"The same line of HTML matched by four patterns: the greedy dot matches almost the whole line, the lazy version and the negated class each find two links, the anchored version finds nothing\"><figcaption>Four patterns, one line. The highlighted part is the match; the darker part inside it is the captured group.<\/figcaption><\/figure>\n<h2>The Dot Is Greedy and the Dot Is Not a Character<\/h2>\n<p><code>.*<\/code> takes everything it can and only gives back what it must. In a line with two links, <code>href=\"(.*)\"<\/code> starts at the first <code>href<\/code>, runs to the end of the line, then backs up to the last quote it can find &#8211; and returns one match containing both links and the markup between them.<\/p>\n<p>Two things fix it. The lazy quantifier <code>.*?<\/code> stops at the first quote that lets the rest of the pattern succeed. The negated class <code>[^\"]*<\/code> cannot cross a quote at all, which says the same thing without any backtracking &#8211; and is the version worth writing, because it states the constraint instead of relying on how the engine unwinds.<\/p>\n<h2>A Negated Class Includes the Line Break<\/h2>\n<p>The dot does not match a newline unless the <code>s<\/code> flag is set. A negated character class does &#8211; <code>[^&amp;]<\/code> means anything that is not an ampersand, and a line break is not an ampersand.<\/p>\n<pre class=\"wp-block-kevinbatdorf-code-block-pro\"><code>text     utm_source=newsletter\n         utm_medium=email\n\n^utm_([a-z_]+)=([^&amp;]+)$      with the m flag: 2 matches\n^utm_([a-z_]+)=([^&amp;]+)       without it: 1 match spanning both lines\n^utm_([a-z_]+)=([^&amp;\\s]+)     the fix: whitespace excluded as well<\/code><\/pre>\n<p>This is the failure that looks like a data problem. A pattern extracting parameters from a multi-line input returns one value that happens to contain everything after it, the value is written to a field, and the field looks like a very long campaign name rather than like a bug.<\/p>\n<h2>Anchors Say Where, Not Whether<\/h2>\n<p>Without anchors a pattern matches anywhere in the input, which is usually what is wanted for extraction and almost never what is wanted for validation. A check that a field contains only digits with <code>[0-9]+<\/code> passes for <code>abc123def<\/code>, because the pattern was never asked about the rest.<\/p>\n<p>Validation needs <code>^<\/code> and <code>$<\/code> on both ends, and it needs to know what those mean in the flavour being used: without the multiline flag they mark the start and end of the whole input, with it every line. Which of the two is correct depends entirely on whether the input is one value or a list of them, and that is a question worth answering explicitly rather than by whichever default the library came with.<\/p>\n<h2>Nested Repetition Is a Different Class of Problem<\/h2>\n<p>The three mistakes above return the wrong answer. This one returns no answer at all. When a repeated group contains something that is itself repeatable &#8211; <code>(a+)+<\/code>, <code>(\\s*\\w+)*<\/code>, <code>(.*,)*<\/code> &#8211; the engine has exponentially many ways to divide the input among the repetitions, and it tries all of them before concluding that there is no match.<\/p>\n<table style=\"width:100%;border-collapse:collapse\">\n<thead>\n<tr>\n<th style=\"vertical-align:top\">Pattern<\/th>\n<th>Against a non-matching input of length n<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td style=\"white-space:nowrap;vertical-align:top\"><code>(a+)+$<\/code><\/td>\n<td>exponential &#8211; thirty characters is already seconds<\/td>\n<\/tr>\n<tr>\n<td style=\"white-space:nowrap;vertical-align:top\"><code>(\\s*\\w+)*$<\/code><\/td>\n<td>the same shape, hidden behind two harmless-looking classes<\/td>\n<\/tr>\n<tr>\n<td style=\"white-space:nowrap;vertical-align:top\"><code>^(\\w+\\s?)+$<\/code><\/td>\n<td>a common name-validation pattern, and a denial of service<\/td>\n<\/tr>\n<tr>\n<td style=\"white-space:nowrap;vertical-align:top\"><code>a+$<\/code><\/td>\n<td>linear &#8211; the outer repetition was the whole problem<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>The dangerous property is that these patterns are fast on every input that matches. The blow-up only happens on inputs that fail, which means a validation pattern behaves perfectly for years and then meets one malformed submission and occupies a worker until it is killed.<\/p>\n<p>The rule that avoids it is mechanical: no quantifier directly around a group whose contents are themselves quantified. Where that is unavoidable, a negated class usually expresses the same intent &#8211; <code>[^,]+,<\/code> instead of <code>(.*,)<\/code> &#8211; and removes the ambiguity that the backtracking was exploring.<\/p>\n<h2>What to Test Before Trusting a Pattern<\/h2>\n<p>Three inputs answer most of it. The case it was written for, to confirm it matches. A case with two occurrences, which is where greediness shows itself and a single-example test never will. And a case that must not match, which is where anchors and nested repetition both reveal themselves &#8211; one by matching anyway, the other by not finishing.<\/p>\n<p>The third is the one that gets skipped, and it is the one that catches both of the problems that cannot be seen by reading the pattern. A test suite for a regular expression is three lines long, and it is the difference between an expression that works and an expression that has not yet been contradicted.<\/p>\n<div class=\"lw-quellen\">\n<h2>Sources<\/h2>\n<ul>\n<li><a href=\"https:\/\/developer.mozilla.org\/en-US\/docs\/Web\/JavaScript\/Guide\/Regular_expressions\" target=\"_blank\" rel=\"noopener noreferrer\">MDN: Regular expressions<\/a><\/li>\n<\/ul>\n<\/div>\n","protected":false},"excerpt":{"rendered":"<p>The greedy dot, the missing anchor and nested repetition are three ways for a working expression to be wrong. All three produce a result, which is what makes them hard to notice.<\/p>\n","protected":false},"author":1,"featured_media":15173,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[148],"tags":[91297,91144],"class_list":["post-10416","post","type-post","status-publish","format-standard","hentry","category-web-development","tag-data-quality","tag-devops"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v28.1 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Regular Expressions: The Greedy Dot, Missing Anchors and Nested Repetition - Lukas Wojcik - Blog<\/title>\n<meta name=\"description\" content=\"Why the dot runs too far, why a character class crosses line breaks, and how nested repetition turns a pattern into a program that never finishes.\" \/>\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.lukaswojcik.com\/blog\/en\/web-development\/regular-expressions-the-greedy-dot-missing-anchors-and-nested-repetition\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Regular Expressions: The Greedy Dot, Missing Anchors and Nested Repetition - Lukas Wojcik - Blog\" \/>\n<meta property=\"og:description\" content=\"Why the dot runs too far, why a character class crosses line breaks, and how nested repetition turns a pattern into a program that never finishes.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.lukaswojcik.com\/blog\/en\/web-development\/regular-expressions-the-greedy-dot-missing-anchors-and-nested-repetition\/\" \/>\n<meta property=\"og:site_name\" content=\"Lukas Wojcik - Blog\" \/>\n<meta property=\"article:published_time\" content=\"2026-09-16T05:20:00+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.lukaswojcik.com\/blog\/wp-content\/uploads\/2026\/09\/hero-10416-what-a-pattern-really-matches-n.png\" \/>\n\t<meta property=\"og:image:width\" content=\"1200\" \/>\n\t<meta property=\"og:image:height\" content=\"630\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/png\" \/>\n<meta name=\"author\" content=\"luky\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"luky\" \/>\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.lukaswojcik.com\\\/blog\\\/en\\\/web-development\\\/regular-expressions-the-greedy-dot-missing-anchors-and-nested-repetition\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.lukaswojcik.com\\\/blog\\\/en\\\/web-development\\\/regular-expressions-the-greedy-dot-missing-anchors-and-nested-repetition\\\/\"},\"author\":{\"name\":\"luky\",\"@id\":\"https:\\\/\\\/www.lukaswojcik.com\\\/blog\\\/#\\\/schema\\\/person\\\/895f7604f9b6b71aad9bba33af28d0f9\"},\"headline\":\"Regular Expressions: The Greedy Dot, Missing Anchors and Nested Repetition\",\"datePublished\":\"2026-09-16T05:20:00+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/www.lukaswojcik.com\\\/blog\\\/en\\\/web-development\\\/regular-expressions-the-greedy-dot-missing-anchors-and-nested-repetition\\\/\"},\"wordCount\":770,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\\\/\\\/www.lukaswojcik.com\\\/blog\\\/#\\\/schema\\\/person\\\/895f7604f9b6b71aad9bba33af28d0f9\"},\"image\":{\"@id\":\"https:\\\/\\\/www.lukaswojcik.com\\\/blog\\\/en\\\/web-development\\\/regular-expressions-the-greedy-dot-missing-anchors-and-nested-repetition\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.lukaswojcik.com\\\/blog\\\/wp-content\\\/uploads\\\/2026\\\/09\\\/hero-10416-what-a-pattern-really-matches-n.png\",\"keywords\":[\"Data Quality\",\"DevOps\"],\"articleSection\":[\"Web Development\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/www.lukaswojcik.com\\\/blog\\\/en\\\/web-development\\\/regular-expressions-the-greedy-dot-missing-anchors-and-nested-repetition\\\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/www.lukaswojcik.com\\\/blog\\\/en\\\/web-development\\\/regular-expressions-the-greedy-dot-missing-anchors-and-nested-repetition\\\/\",\"url\":\"https:\\\/\\\/www.lukaswojcik.com\\\/blog\\\/en\\\/web-development\\\/regular-expressions-the-greedy-dot-missing-anchors-and-nested-repetition\\\/\",\"name\":\"Regular Expressions: The Greedy Dot, Missing Anchors and Nested Repetition - Lukas Wojcik - Blog\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.lukaswojcik.com\\\/blog\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/www.lukaswojcik.com\\\/blog\\\/en\\\/web-development\\\/regular-expressions-the-greedy-dot-missing-anchors-and-nested-repetition\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/www.lukaswojcik.com\\\/blog\\\/en\\\/web-development\\\/regular-expressions-the-greedy-dot-missing-anchors-and-nested-repetition\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.lukaswojcik.com\\\/blog\\\/wp-content\\\/uploads\\\/2026\\\/09\\\/hero-10416-what-a-pattern-really-matches-n.png\",\"datePublished\":\"2026-09-16T05:20:00+00:00\",\"description\":\"Why the dot runs too far, why a character class crosses line breaks, and how nested repetition turns a pattern into a program that never finishes.\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/www.lukaswojcik.com\\\/blog\\\/en\\\/web-development\\\/regular-expressions-the-greedy-dot-missing-anchors-and-nested-repetition\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/www.lukaswojcik.com\\\/blog\\\/en\\\/web-development\\\/regular-expressions-the-greedy-dot-missing-anchors-and-nested-repetition\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/www.lukaswojcik.com\\\/blog\\\/en\\\/web-development\\\/regular-expressions-the-greedy-dot-missing-anchors-and-nested-repetition\\\/#primaryimage\",\"url\":\"https:\\\/\\\/www.lukaswojcik.com\\\/blog\\\/wp-content\\\/uploads\\\/2026\\\/09\\\/hero-10416-what-a-pattern-really-matches-n.png\",\"contentUrl\":\"https:\\\/\\\/www.lukaswojcik.com\\\/blog\\\/wp-content\\\/uploads\\\/2026\\\/09\\\/hero-10416-what-a-pattern-really-matches-n.png\",\"width\":1200,\"height\":630,\"caption\":\"Regular Expressions: The Greedy Dot, Missing Anchors and Nested Repetition\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/www.lukaswojcik.com\\\/blog\\\/en\\\/web-development\\\/regular-expressions-the-greedy-dot-missing-anchors-and-nested-repetition\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/www.lukaswojcik.com\\\/blog\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Regular Expressions: The Greedy Dot, Missing Anchors and Nested Repetition\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/www.lukaswojcik.com\\\/blog\\\/#website\",\"url\":\"https:\\\/\\\/www.lukaswojcik.com\\\/blog\\\/\",\"name\":\"Lukas Wojcik - Blog\",\"description\":\"\",\"publisher\":{\"@id\":\"https:\\\/\\\/www.lukaswojcik.com\\\/blog\\\/#\\\/schema\\\/person\\\/895f7604f9b6b71aad9bba33af28d0f9\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/www.lukaswojcik.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.lukaswojcik.com\\\/blog\\\/#\\\/schema\\\/person\\\/895f7604f9b6b71aad9bba33af28d0f9\",\"name\":\"luky\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/www.lukaswojcik.com\\\/blog\\\/wp-content\\\/uploads\\\/2026\\\/07\\\/lw-x2.jpg\",\"url\":\"https:\\\/\\\/www.lukaswojcik.com\\\/blog\\\/wp-content\\\/uploads\\\/2026\\\/07\\\/lw-x2.jpg\",\"contentUrl\":\"https:\\\/\\\/www.lukaswojcik.com\\\/blog\\\/wp-content\\\/uploads\\\/2026\\\/07\\\/lw-x2.jpg\",\"width\":424,\"height\":636,\"caption\":\"luky\"},\"logo\":{\"@id\":\"https:\\\/\\\/www.lukaswojcik.com\\\/blog\\\/wp-content\\\/uploads\\\/2026\\\/07\\\/lw-x2.jpg\"},\"sameAs\":[\"https:\\\/\\\/www.lukaswojcik.com\\\/blog\"],\"url\":\"https:\\\/\\\/www.lukaswojcik.com\\\/blog\\\/author\\\/luky\\\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Regular Expressions: The Greedy Dot, Missing Anchors and Nested Repetition - Lukas Wojcik - Blog","description":"Why the dot runs too far, why a character class crosses line breaks, and how nested repetition turns a pattern into a program that never finishes.","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.lukaswojcik.com\/blog\/en\/web-development\/regular-expressions-the-greedy-dot-missing-anchors-and-nested-repetition\/","og_locale":"en_US","og_type":"article","og_title":"Regular Expressions: The Greedy Dot, Missing Anchors and Nested Repetition - Lukas Wojcik - Blog","og_description":"Why the dot runs too far, why a character class crosses line breaks, and how nested repetition turns a pattern into a program that never finishes.","og_url":"https:\/\/www.lukaswojcik.com\/blog\/en\/web-development\/regular-expressions-the-greedy-dot-missing-anchors-and-nested-repetition\/","og_site_name":"Lukas Wojcik - Blog","article_published_time":"2026-09-16T05:20:00+00:00","og_image":[{"width":1200,"height":630,"url":"https:\/\/www.lukaswojcik.com\/blog\/wp-content\/uploads\/2026\/09\/hero-10416-what-a-pattern-really-matches-n.png","type":"image\/png"}],"author":"luky","twitter_card":"summary_large_image","twitter_misc":{"Written by":"luky","Est. reading time":"4 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.lukaswojcik.com\/blog\/en\/web-development\/regular-expressions-the-greedy-dot-missing-anchors-and-nested-repetition\/#article","isPartOf":{"@id":"https:\/\/www.lukaswojcik.com\/blog\/en\/web-development\/regular-expressions-the-greedy-dot-missing-anchors-and-nested-repetition\/"},"author":{"name":"luky","@id":"https:\/\/www.lukaswojcik.com\/blog\/#\/schema\/person\/895f7604f9b6b71aad9bba33af28d0f9"},"headline":"Regular Expressions: The Greedy Dot, Missing Anchors and Nested Repetition","datePublished":"2026-09-16T05:20:00+00:00","mainEntityOfPage":{"@id":"https:\/\/www.lukaswojcik.com\/blog\/en\/web-development\/regular-expressions-the-greedy-dot-missing-anchors-and-nested-repetition\/"},"wordCount":770,"commentCount":0,"publisher":{"@id":"https:\/\/www.lukaswojcik.com\/blog\/#\/schema\/person\/895f7604f9b6b71aad9bba33af28d0f9"},"image":{"@id":"https:\/\/www.lukaswojcik.com\/blog\/en\/web-development\/regular-expressions-the-greedy-dot-missing-anchors-and-nested-repetition\/#primaryimage"},"thumbnailUrl":"https:\/\/www.lukaswojcik.com\/blog\/wp-content\/uploads\/2026\/09\/hero-10416-what-a-pattern-really-matches-n.png","keywords":["Data Quality","DevOps"],"articleSection":["Web Development"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.lukaswojcik.com\/blog\/en\/web-development\/regular-expressions-the-greedy-dot-missing-anchors-and-nested-repetition\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.lukaswojcik.com\/blog\/en\/web-development\/regular-expressions-the-greedy-dot-missing-anchors-and-nested-repetition\/","url":"https:\/\/www.lukaswojcik.com\/blog\/en\/web-development\/regular-expressions-the-greedy-dot-missing-anchors-and-nested-repetition\/","name":"Regular Expressions: The Greedy Dot, Missing Anchors and Nested Repetition - Lukas Wojcik - Blog","isPartOf":{"@id":"https:\/\/www.lukaswojcik.com\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.lukaswojcik.com\/blog\/en\/web-development\/regular-expressions-the-greedy-dot-missing-anchors-and-nested-repetition\/#primaryimage"},"image":{"@id":"https:\/\/www.lukaswojcik.com\/blog\/en\/web-development\/regular-expressions-the-greedy-dot-missing-anchors-and-nested-repetition\/#primaryimage"},"thumbnailUrl":"https:\/\/www.lukaswojcik.com\/blog\/wp-content\/uploads\/2026\/09\/hero-10416-what-a-pattern-really-matches-n.png","datePublished":"2026-09-16T05:20:00+00:00","description":"Why the dot runs too far, why a character class crosses line breaks, and how nested repetition turns a pattern into a program that never finishes.","breadcrumb":{"@id":"https:\/\/www.lukaswojcik.com\/blog\/en\/web-development\/regular-expressions-the-greedy-dot-missing-anchors-and-nested-repetition\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.lukaswojcik.com\/blog\/en\/web-development\/regular-expressions-the-greedy-dot-missing-anchors-and-nested-repetition\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.lukaswojcik.com\/blog\/en\/web-development\/regular-expressions-the-greedy-dot-missing-anchors-and-nested-repetition\/#primaryimage","url":"https:\/\/www.lukaswojcik.com\/blog\/wp-content\/uploads\/2026\/09\/hero-10416-what-a-pattern-really-matches-n.png","contentUrl":"https:\/\/www.lukaswojcik.com\/blog\/wp-content\/uploads\/2026\/09\/hero-10416-what-a-pattern-really-matches-n.png","width":1200,"height":630,"caption":"Regular Expressions: The Greedy Dot, Missing Anchors and Nested Repetition"},{"@type":"BreadcrumbList","@id":"https:\/\/www.lukaswojcik.com\/blog\/en\/web-development\/regular-expressions-the-greedy-dot-missing-anchors-and-nested-repetition\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.lukaswojcik.com\/blog\/"},{"@type":"ListItem","position":2,"name":"Regular Expressions: The Greedy Dot, Missing Anchors and Nested Repetition"}]},{"@type":"WebSite","@id":"https:\/\/www.lukaswojcik.com\/blog\/#website","url":"https:\/\/www.lukaswojcik.com\/blog\/","name":"Lukas Wojcik - Blog","description":"","publisher":{"@id":"https:\/\/www.lukaswojcik.com\/blog\/#\/schema\/person\/895f7604f9b6b71aad9bba33af28d0f9"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.lukaswojcik.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.lukaswojcik.com\/blog\/#\/schema\/person\/895f7604f9b6b71aad9bba33af28d0f9","name":"luky","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.lukaswojcik.com\/blog\/wp-content\/uploads\/2026\/07\/lw-x2.jpg","url":"https:\/\/www.lukaswojcik.com\/blog\/wp-content\/uploads\/2026\/07\/lw-x2.jpg","contentUrl":"https:\/\/www.lukaswojcik.com\/blog\/wp-content\/uploads\/2026\/07\/lw-x2.jpg","width":424,"height":636,"caption":"luky"},"logo":{"@id":"https:\/\/www.lukaswojcik.com\/blog\/wp-content\/uploads\/2026\/07\/lw-x2.jpg"},"sameAs":["https:\/\/www.lukaswojcik.com\/blog"],"url":"https:\/\/www.lukaswojcik.com\/blog\/author\/luky\/"}]}},"_links":{"self":[{"href":"https:\/\/www.lukaswojcik.com\/blog\/wp-json\/wp\/v2\/posts\/10416","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.lukaswojcik.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.lukaswojcik.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.lukaswojcik.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.lukaswojcik.com\/blog\/wp-json\/wp\/v2\/comments?post=10416"}],"version-history":[{"count":3,"href":"https:\/\/www.lukaswojcik.com\/blog\/wp-json\/wp\/v2\/posts\/10416\/revisions"}],"predecessor-version":[{"id":17149,"href":"https:\/\/www.lukaswojcik.com\/blog\/wp-json\/wp\/v2\/posts\/10416\/revisions\/17149"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.lukaswojcik.com\/blog\/wp-json\/wp\/v2\/media\/15173"}],"wp:attachment":[{"href":"https:\/\/www.lukaswojcik.com\/blog\/wp-json\/wp\/v2\/media?parent=10416"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.lukaswojcik.com\/blog\/wp-json\/wp\/v2\/categories?post=10416"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.lukaswojcik.com\/blog\/wp-json\/wp\/v2\/tags?post=10416"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}