<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Flagrant Badassery</title>
	<atom:link href="https://blog.stevenlevithan.com/feed" rel="self" type="application/rss+xml" />
	<link>https://blog.stevenlevithan.com</link>
	<description>A JavaScript and regular expression centric blog</description>
	<lastBuildDate>Tue, 22 Apr 2025 06:59:27 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=7.0</generator>
<site xmlns="com-wordpress:feed-additions:1">190005562</site>	<item>
		<title>Oniguruma-To-ES: Translate Oniguruma regexes to native JavaScript</title>
		<link>https://blog.stevenlevithan.com/archives/oniguruma-to-javascript</link>
					<comments>https://blog.stevenlevithan.com/archives/oniguruma-to-javascript#respond</comments>
		
		<dc:creator><![CDATA[Steven Levithan]]></dc:creator>
		<pubDate>Sun, 29 Dec 2024 17:42:17 +0000</pubDate>
				<category><![CDATA[JavaScript]]></category>
		<category><![CDATA[Project Releases]]></category>
		<category><![CDATA[Regular Expressions]]></category>
		<guid isPermaLink="false">https://blog.stevenlevithan.com/?p=1197</guid>

					<description><![CDATA[A couple months ago I launched a new open source project, Oniguruma-To-ES. You can use it to: Take advantage of Oniguruma's many extended regex features in JavaScript. Run regexes written for Oniguruma from JavaScript, such as those used in TextMate grammars (used by VS Code, Shiki syntax highlighter, etc.). Share regexes across your Ruby and &#8230; <a href="https://blog.stevenlevithan.com/archives/oniguruma-to-javascript" class="more-link">Continue reading <span class="screen-reader-text">Oniguruma-To-ES: Translate Oniguruma regexes to native JavaScript</span></a>]]></description>
										<content:encoded><![CDATA[<p>A couple months ago I launched a new open source project, <strong><a href="https://github.com/slevithan/oniguruma-to-es">Oniguruma-To-ES</a></strong>. You can use it to:</p>

<ul>
  <li>Take advantage of <a href="https://github.com/kkos/oniguruma">Oniguruma</a>'s many extended regex features in JavaScript.</li>
  <li>Run regexes written for Oniguruma from JavaScript, such as those used in TextMate grammars (used by VS Code, <a href="https://shiki.style/">Shiki</a> syntax highlighter, etc.).</li>
  <li>Share regexes across your Ruby and JavaScript code.<sup><img src="https://s.w.org/images/core/emoji/17.0.2/72x72/2733.png" alt="✳" class="wp-smiley" style="height: 1em; max-height: 1em;" />︎</sup></li>
</ul>

<p>Oniguruma-To-ES deeply understands the hundreds of large and small differences between Oniguruma and JavaScript regex syntax and behavior, across multiple JavaScript version targets. It's <em>obsessive</em> about ensuring that the emulated features it supports have <strong>exactly the same behavior</strong>, even in extreme edge cases. And it's been battle-tested on thousands of real-world Oniguruma regexes used in TextMate grammars (via the Shiki library).</p>

<p>Depending on features used, Oniguruma-To-ES might use advanced emulation via a <code>RegExp</code> subclass (that remains a native JavaScript regular expression).</p>

<p>There's also a <strong><a href="https://slevithan.github.io/oniguruma-to-es/demo/">demo page</a></strong>. Check it out!</p>

<p><sup><img src="https://s.w.org/images/core/emoji/17.0.2/72x72/2733.png" alt="✳" class="wp-smiley" style="height: 1em; max-height: 1em;" />︎: Ruby 2.0+ uses <a href="https://github.com/k-takata/Onigmo">Onigmo</a>, a fork of Oniguruma with similar syntax and behavior.</sup></p>]]></content:encoded>
					
					<wfw:commentRss>https://blog.stevenlevithan.com/archives/oniguruma-to-javascript/feed</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">1197</post-id>	</item>
		<item>
		<title>Regexes Got Good: The History and Future of Regular Expressions in JavaScript</title>
		<link>https://blog.stevenlevithan.com/archives/regexes-got-good</link>
					<comments>https://blog.stevenlevithan.com/archives/regexes-got-good#comments</comments>
		
		<dc:creator><![CDATA[Steven Levithan]]></dc:creator>
		<pubDate>Tue, 20 Aug 2024 23:07:58 +0000</pubDate>
				<category><![CDATA[JavaScript]]></category>
		<category><![CDATA[Regular Expressions]]></category>
		<guid isPermaLink="false">https://blog.stevenlevithan.com/?p=1171</guid>

					<description><![CDATA[Over at Smashing Magazine, I just published a 3,100-word (no fluff) article evaluating the history, present state, and future of regexes in JavaScript, with lots of tips. I think all JavaScript developers will learn something from this, and I'd love to know what was new for you! Check it out: Regexes Got Good: The History &#8230; <a href="https://blog.stevenlevithan.com/archives/regexes-got-good" class="more-link">Continue reading <span class="screen-reader-text">Regexes Got Good: The History and Future of Regular Expressions in JavaScript</span></a>]]></description>
										<content:encoded><![CDATA[<p>Over at Smashing Magazine, I just published a 3,100-word (no fluff) article evaluating the history, present state, and future of regexes in JavaScript, with lots of tips. I think <em>all</em> JavaScript developers will learn something from this, and I'd love to know what was new for you!</p>

<p>Check it out: <strong><a href="https://www.smashingmagazine.com/2024/08/history-future-regular-expressions-javascript/">Regexes Got Good: The History And Future Of Regular Expressions In JavaScript</a></strong>.</p>

<p><a href="https://www.smashingmagazine.com/2024/08/history-future-regular-expressions-javascript/"><img data-recalc-dims="1" fetchpriority="high" decoding="async" src="https://i0.wp.com/blog.stevenlevithan.com/wp-content/smashing-magazine.png?resize=660%2C437&#038;ssl=1" alt="article screenshot" width="660" height="437"></a></p>]]></content:encoded>
					
					<wfw:commentRss>https://blog.stevenlevithan.com/archives/regexes-got-good/feed</wfw:commentRss>
			<slash:comments>1</slash:comments>
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">1171</post-id>	</item>
		<item>
		<title>Launching: Regex+ and Regex Colorizer v1</title>
		<link>https://blog.stevenlevithan.com/archives/new-regex-libraries</link>
					<comments>https://blog.stevenlevithan.com/archives/new-regex-libraries#respond</comments>
		
		<dc:creator><![CDATA[Steven Levithan]]></dc:creator>
		<pubDate>Thu, 06 Jun 2024 15:25:47 +0000</pubDate>
				<category><![CDATA[JavaScript]]></category>
		<category><![CDATA[Project Releases]]></category>
		<category><![CDATA[Regular Expressions]]></category>
		<guid isPermaLink="false">https://blog.stevenlevithan.com/?p=1154</guid>

					<description><![CDATA[I've recently released two new open source regex libraries. Regex+ Regex+ provides a regex template tag for dynamically creating readable, high performance, native JavaScript regular expressions with best practices built-in and powerful/advanced features that improve performance, readability, and maintainability. It's lightweight and supports all ES2025 regex features. Highlights include support for free-spacing and comments, atomic &#8230; <a href="https://blog.stevenlevithan.com/archives/new-regex-libraries" class="more-link">Continue reading <span class="screen-reader-text">Launching: Regex+ and Regex Colorizer v1</span></a>]]></description>
										<content:encoded><![CDATA[<p>I've recently released two new open source regex libraries.</p>

<h2><a href="https://github.com/slevithan/regex">Regex+</a></h2>

<p>Regex+ provides a <code>regex</code> template tag for dynamically creating readable, high performance, native JavaScript regular expressions with best practices built-in and powerful/advanced features that improve performance, readability, and maintainability. It's lightweight and supports all ES2025 regex features.</p>

<p>Highlights include support for free-spacing and comments, atomic groups and possessive quantifiers (that can help you avoid ReDoS), subroutines and subroutine definition groups (that enable powerful subpattern composition), and context-aware interpolation of <code>RegExp</code> instances, escaped strings, and partial patterns.</p>

<p>Run <code>npm install regex</code> in your JavaScript project and then simply <code>import {regex} from 'regex'</code> to get started. Check out examples and more on <a href="https://github.com/slevithan/regex">GitHub</a>.</p>

<h2><a href="https://github.com/slevithan/regex-colorizer">Regex Colorizer</a> 1.0</h2>

<p>Regex Colorizer is a project that highlights regex syntax, for use in blogs, docs, and regex tools. I created it for old-school <a href="https://stevenlevithan.com/regexpal/">RegexPal</a> back in 2007, but it hadn't received any updates since 2010. Until now. Version 1.0 is a significant update that improves its API and adds support for modern JavaScript regex syntax and flags. Check out <a href="https://slevithan.github.io/regex-colorizer/demo/">the demo</a>!</p>]]></content:encoded>
					
					<wfw:commentRss>https://blog.stevenlevithan.com/archives/new-regex-libraries/feed</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">1154</post-id>	</item>
		<item>
		<title>Awesome Regex: The best regex resources for all major regex flavors</title>
		<link>https://blog.stevenlevithan.com/archives/awesome-regex</link>
					<comments>https://blog.stevenlevithan.com/archives/awesome-regex#comments</comments>
		
		<dc:creator><![CDATA[Steven Levithan]]></dc:creator>
		<pubDate>Wed, 08 May 2024 13:07:23 +0000</pubDate>
				<category><![CDATA[Project Releases]]></category>
		<category><![CDATA[Regular Expressions]]></category>
		<guid isPermaLink="false">https://blog.stevenlevithan.com/?p=1129</guid>

					<description><![CDATA[I created a curated list on GitHub of the best regular expression tools, tutorials, libraries, and many other resources. It covers all major regex flavors, and currently includes especially deep coverage of regular expressions in JavaScript (including a concise history of all regex features added to JavaScript in ES6 through ES2024, plus active proposals for &#8230; <a href="https://blog.stevenlevithan.com/archives/awesome-regex" class="more-link">Continue reading <span class="screen-reader-text">Awesome Regex: The best regex resources for all major regex flavors</span></a>]]></description>
										<content:encoded><![CDATA[<p><a href="https://github.com/slevithan/awesome-regex"><img decoding="async" src="https://github.com/slevithan/awesome-regex/raw/main/media/awesome-regex-banner.svg" alt="Awesome Regex logo"></a></p>

<p>I created a curated list on GitHub of the <a href="https://github.com/slevithan/awesome-regex">best regular expression tools, tutorials, libraries, and many other resources</a>. It covers all major regex flavors, and currently includes especially deep coverage of regular expressions in JavaScript (including a concise history of all regex features added to JavaScript in ES6 through ES2024, plus active proposals for the future).</p>

<p>Check it out, and return to it easily with a handy shortcut URL: <a href="https://regex.cool"><strong>regex.cool</strong></a>.</p>]]></content:encoded>
					
					<wfw:commentRss>https://blog.stevenlevithan.com/archives/awesome-regex/feed</wfw:commentRss>
			<slash:comments>1</slash:comments>
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">1129</post-id>	</item>
		<item>
		<title>parseUri 2.0: A mighty but tiny URI parser</title>
		<link>https://blog.stevenlevithan.com/archives/parseuri-2</link>
					<comments>https://blog.stevenlevithan.com/archives/parseuri-2#respond</comments>
		
		<dc:creator><![CDATA[Steven Levithan]]></dc:creator>
		<pubDate>Fri, 05 Apr 2024 22:26:10 +0000</pubDate>
				<category><![CDATA[JavaScript]]></category>
		<category><![CDATA[Project Releases]]></category>
		<category><![CDATA[parseuri]]></category>
		<category><![CDATA[uri]]></category>
		<guid isPermaLink="false">https://blog.stevenlevithan.com/?p=1107</guid>

					<description><![CDATA[I created parseUri v1 17 years ago, but never hosted it on GitHub/npm because it's older than both of those tools. Nevertheless, it’s been used very widely ever since due to it being tiny and predating JavaScript’s built-in URL constructor. After this short gap, I just released v2: github.com/slevithan/parseuri. It’s still tiny (nothing similar comes &#8230; <a href="https://blog.stevenlevithan.com/archives/parseuri-2" class="more-link">Continue reading <span class="screen-reader-text">parseUri 2.0: A mighty but tiny URI parser</span></a>]]></description>
										<content:encoded><![CDATA[<p>I created <code>parseUri</code> <a href="https://blog.stevenlevithan.com/archives/parseuri">v1</a> 17 years ago, but never hosted it on GitHub/npm because it's older than both of those tools. Nevertheless, it’s been used very widely ever since due to it being tiny and predating JavaScript’s built-in <code>URL</code> constructor. After this short gap, I just released v2: <strong><a href="https://github.com/slevithan/parseuri">github.com/slevithan/parseuri</a></strong>. It’s still tiny (nothing similar comes close, even with libraries that support far fewer URI parts, types, and edge cases), and it includes several advantages over <code>URL</code>:</p>

<ul>
  <li><code>parseUri</code> gives you many additional properties (<code>authority</code>, <code>userinfo</code>, <code>subdomain</code>, <code>domain</code>, <code>tld</code>, <code>resource</code>, <code>directory</code>, <code>filename</code>, <code>suffix</code>) that are not available from <code>URL</code>.</li>
  <li><code>URL</code> throws e.g. if not given a protocol, and in many other cases of valid (but not supported) and invalid URIs. <code>parseUri</code> makes a best case effort even with partial or invalid URIs and is extremely good with edge cases.</li>
  <li><code>URL</code>’s rules don’t allow correctly handling many non-web protocols. For example, <code>URL</code> doesn’t throw on any of <code>'git://localhost:1234'</code>, <code>'ssh://myid@192.168.1.101'</code>, or <code>'t2ab:///path/entry'</code>, but it also doesn’t get their details correct since it treats everything after <code><non-web-protocol>:</code> up to <code>?</code> or <code>#</code> as part of the pathname.</li>
  <li><code>parseUri</code> includes a “friendly” parsing mode (in addition to its default mode) that handles human-friendly URLs like <code>'example.com/index.html'</code> as expected.</li>
  <li><code>parseUri</code> includes partial/extensible support for second-level domains like in <code>'//example.co.uk'</code>.</li>
</ul>

<p>Conversely, <code>parseUri</code> is single-purpose and doesn’t do normalization. But of course you can pass URIs through a normalizer separately, if you need that. Or, if you wanted to create an exceptionally lightweight URI normalizer, <code>parseUri</code> would be a great base to build on top of. <img src="https://s.w.org/images/core/emoji/17.0.2/72x72/1f60a.png" alt="😊" class="wp-smiley" style="height: 1em; max-height: 1em;" /></p>

<p>So although it’s needed less often these days because of the built-in <code>URL</code>, if <code>URL</code> is ever not enough for your needs, this is an extremely accurate, flexible, and lightweight option.</p>

<p>Check it out!</p>

<ul>
  <li><a href="https://github.com/slevithan/parseuri">parseUri on GitHub</a></li>
  <li>The <a href="https://slevithan.github.io/parseuri/demo/">demo page</a> lets you easily test and compare results</li>
  <li><a href="https://github.com/slevithan/parseuri/releases">Changelog</a></li>
  <li><a href="https://slevithan.github.io/parseuri/spec/">Tests</a></li>
<ul>

]]></content:encoded>
					
					<wfw:commentRss>https://blog.stevenlevithan.com/archives/parseuri-2/feed</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">1107</post-id>	</item>
	</channel>
</rss>
