# regular-expressions

Published articles for regular-expressions.

This is one page of public article previews, not the complete archive. Follow Next page to continue. Summaries are not the original full articles.

## Soft-deprecating re.match()

DevFeed: [Soft-deprecating re.match()](<https://devfeed.tech/articles/soft-deprecating-re-match-31169.md>)

Original publisher: [Read original article](<https://simonwillison.net/2026/Sep/11/soft-deprecating-re-match/>)

Author: Simon Willison

Published: 2026-09-11T14:47:57Z

Content type: article

Language: en

Sources: [Simon Willison's Weblog](<https://devfeed.tech/sources/simon-willison-s-weblog.md>)

Topics: [Python](<https://devfeed.tech/topics/python.md>), [Code](<https://devfeed.tech/topics/code.md>)

Tags: [python](<https://devfeed.tech/tags/python.md>), [python-1-283](<https://devfeed.tech/tags/python-1-283.md>), [regular-expressions](<https://devfeed.tech/tags/regular-expressions.md>), [regular-expressions-38](<https://devfeed.tech/tags/regular-expressions-38.md>), [release](<https://devfeed.tech/tags/release.md>)

### AI overview

Python 3.15 is soft-deprecating the confusing re.match() function, recommending clearer alternatives such as re.prefixmatch(), re.search(), and re.fullmatch().

### Source excerpt

Soft-deprecating re.match() Python has a concept of soft deprecation, where APIs are marked as "should no longer be used to write new code" without any promise/threat to remove them in the future. Python 3.15 release manager Hugo van Kemenade describes how in the upcoming 3.15 release soft deprecation has come for the venerable but deeply confusing re.match() function. It's now available with the much clearer alternative re.prefixmatch() name - reflecting how it anchors at the beginning of the string but not the end. Most of the time you probably want re.search() (match this pattern anywhere in the string) or re.fullmatch() (match the entire string) instead. Via Lobste.rs Tags: python, regular-expressions

## New things for regular expressions in PostgreSQL (pg\_tre and pg\_re2)

DevFeed: [New things for regular expressions in PostgreSQL (pg\_tre and pg\_re2)](<https://devfeed.tech/articles/new-things-for-regular-expressions-in-postgresql-pg-tre-and-pg-re2-33694.md>)

Original publisher: [Read original article](<https://www.depesz.com/2026/08/25/new-things-for-regular-expressions-in-postgresql-pg_tre-and-pg_re2/>)

Author: depesz

Published: 2026-08-25T18:41:53Z

Content type: tutorial

Language: en

Sources: [select \* from depesz;](<https://devfeed.tech/sources/select-from-depesz.md>)

Topics: [PostgreSQL](<https://devfeed.tech/topics/postgresql.md>), [Databases](<https://devfeed.tech/topics/databases.md>), [test](<https://devfeed.tech/topics/test.md>)

Tags: [expression](<https://devfeed.tech/tags/expression.md>), [extension](<https://devfeed.tech/tags/extension.md>), [extensions](<https://devfeed.tech/tags/extensions.md>), [pg-re2](<https://devfeed.tech/tags/pg-re2.md>), [pg-tre](<https://devfeed.tech/tags/pg-tre.md>), [postgresql](<https://devfeed.tech/tags/postgresql.md>), [re2](<https://devfeed.tech/tags/re2.md>), [regexp](<https://devfeed.tech/tags/regexp.md>), [regular](<https://devfeed.tech/tags/regular.md>), [regular-expressions](<https://devfeed.tech/tags/regular-expressions.md>), [test-data](<https://devfeed.tech/tags/test-data.md>), [uncategorized](<https://devfeed.tech/tags/uncategorized.md>)

### AI overview

This article compares PostgreSQL regular-expression approaches using pg_tre and pg_re2 against built-in matching and pg_trgm. Tests on a large table of query plans find that pg_tre is slower than pg_trgm for exact substring searches but supports fuzzy matching, while pg_re2 performs faster than the tested built-in scan. The author notes that both extensions have limitations and rough edges.

### Source excerpt

Well, truth be told these are not all that new (couple of months), but I finally have gotten around to research it. So, let's see what's what. For starters I need some test data. Luckily, I have explain.depesz.com DB... Extracted all plans to side table, with this structure: =$ \d all_plans Table "public.all_plans" Column | ... Continue reading "New things for regular expressions in PostgreSQL (pg_tre and pg_re2)"

## Make regular expressions easier to read

DevFeed: [Make regular expressions easier to read](<https://devfeed.tech/articles/make-regular-expressions-easier-to-read-37309.md>)

Original publisher: [Read original article](<https://muffinman.io/blog/make-regular-expressions-easier-to-read/>)

Author: Stanko

Published: 2025-03-31T00:00:00Z

Content type: tutorial

Language: en

Sources: [Stanko Tadić](<https://devfeed.tech/sources/stanko-tadic.md>)

Topics: [Code](<https://devfeed.tech/topics/code.md>), [formatting](<https://devfeed.tech/topics/formatting.md>), [Maintainability](<https://devfeed.tech/topics/maintainability.md>)

Tags: [example](<https://devfeed.tech/tags/example.md>), [extra](<https://devfeed.tech/tags/extra.md>), [join](<https://devfeed.tech/tags/join.md>), [maintainability](<https://devfeed.tech/tags/maintainability.md>), [readability](<https://devfeed.tech/tags/readability.md>), [regular-expressions](<https://devfeed.tech/tags/regular-expressions.md>), [value](<https://devfeed.tech/tags/value.md>)

### AI overview

The article presents a formatting technique for making complex regular expressions easier to read: split the expression into multiple string components, join them, and construct the final regex. The approach adds code and requires escaping backslashes, but enables scanning and comments that can improve readability and maintainability.

### Source excerpt

This is a simple formatting trick I use to make regular expressions more readable. The secret? Break them into multiple lines. To achieve this, format the regex as an array of strings and then concatenate the array into a single regex string. Example # Compare this example, written in a single line: const FILTER_REGEXP = /(?<name>blur|brightness|contrast|grayscale|hue-rotate|invert|opacity|saturate|sepia)\((?<value>-?\d*(?:\.\d*)?)(?<unit>\w*?)\)/g; with the multi-line version: const SUPPORTED_FILTERS = [ 'blur', 'brightness', 'contrast', 'grayscale', 'hue-rotate', 'invert', 'opacity', 'saturate', 'sepia', ].join('|'); const FILTER_REGEXP = new RegExp( [ `(?<name>${SUPPORTED_FILTERS})`, // filter name `\\(`, `(?<value>\-?\\d*(?:\\.\\d*)?)`, // value `(?<unit>\\w*?)`, // unit if any `\\)`, ].join(''), 'g' ); The multi-line version has a bit more code, but it's easier to scan and read. It also allows us to write comments for each section, clarifying the purpose of each part of the regex. I've found that complex expressions are much easier to write this way. I believe it greatly reduces the cognitive load for both the writer and the reader. Caveats # You'll need to escape the backslashes in regex strings. While this is a minor inconvenience, the readability benefits easily outweigh it. Conclusion # It boils down to personal preference, but I believe the extra code is worth it, as it improves readability and maintainability. This is especially true when dealing with notoriously difficult-to-parse complex regular expressions.

## Extract a Number from a String with JavaScript

DevFeed: [Extract a Number from a String with JavaScript](<https://devfeed.tech/articles/extract-a-number-from-a-string-with-javascript-37487.md>)

Original publisher: [Read original article](<https://davidwalsh.name/javascript-extract-string>)

Author: David Walsh

Published: 2024-01-16T11:48:41Z

Content type: tutorial

Language: en

Sources: [David Walsh](<https://devfeed.tech/sources/david-walsh.md>)

Topics: [JavaScript](<https://devfeed.tech/topics/javascript.md>), [Regular expression](<https://devfeed.tech/topics/regular-expression.md>), [Web Development](<https://devfeed.tech/topics/web-development.md>), [HTML](<https://devfeed.tech/topics/html.md>)

Tags: [html](<https://devfeed.tech/tags/html.md>), [input](<https://devfeed.tech/tags/input.md>), [javascript](<https://devfeed.tech/tags/javascript.md>), [javascript-quick-tips](<https://devfeed.tech/tags/javascript-quick-tips.md>), [numbers](<https://devfeed.tech/tags/numbers.md>), [quick-tips](<https://devfeed.tech/tags/quick-tips.md>), [regular-expressions](<https://devfeed.tech/tags/regular-expressions.md>), [string](<https://devfeed.tech/tags/string.md>)

### AI overview

This tutorial explains how to extract numbers from strings in JavaScript, particularly user input from HTML form fields, using regular expressions.

### Source excerpt

User input from HTML form fields is generally provided to JavaScript as a string. We've lived with that fact for decades but sometimes developers need to extract numbers from that string. There are multiple ways to get those numbers but let's rely on regular expressions to extract those numbers! To employ a regular expression to [...] The post Extract a Number from a String with JavaScript appeared first on David Walsh Blog.

## Making the most of GitHub Code Search

DevFeed: [Making the most of GitHub Code Search](<https://devfeed.tech/articles/making-the-most-of-github-code-search-37174.md>)

Original publisher: [Read original article](<https://arkadiuszchmura.com/posts/making-the-most-of-github-code-search/>)

Published: 2023-09-30T00:00:00Z

Content type: tutorial

Language: en

Sources: [Arkadiusz Chmura](<https://devfeed.tech/sources/arkadiusz-chmura.md>)

Topics: [code search](<https://devfeed.tech/topics/code-search.md>), [GitHub](<https://devfeed.tech/topics/github.md>), [Code](<https://devfeed.tech/topics/code.md>), [syntax](<https://devfeed.tech/topics/syntax.md>), [Sorting](<https://devfeed.tech/topics/sorting.md>)

Tags: [code-search](<https://devfeed.tech/tags/code-search.md>), [github](<https://devfeed.tech/tags/github.md>), [regular-expressions](<https://devfeed.tech/tags/regular-expressions.md>), [repositories](<https://devfeed.tech/tags/repositories.md>), [search](<https://devfeed.tech/tags/search.md>), [sorting](<https://devfeed.tech/tags/sorting.md>), [syntax](<https://devfeed.tech/tags/syntax.md>)

### AI overview

A practical guide to GitHub Code Search, covering exact-string searches, Boolean expressions, regular expressions, qualifiers, result limits, sorting behavior, and indexing limitations. It also presents the tool as useful for code exploration and learning.

### Source excerpt

The new search engine offers powerful code searching mechanisms we can leverage for quickly finding the code we need, as well as for exploration and learning.

## Analyzing Teleport RBAC with Z3: Regexes, queries and formal methods

DevFeed: [Analyzing Teleport RBAC with Z3: Regexes, queries and formal methods](<https://devfeed.tech/articles/analyzing-teleport-rbac-with-z3-regexes-queries-and-formal-methods-29983.md>)

Original publisher: [Read original article](<https://goteleport.com/blog/z3-rbac/>)

Author: info@goteleport.com (Andrew Helwer)

Published: 2022-01-19T00:00:00Z

Content type: tutorial

Language: en

Sources: [Teleport](<https://devfeed.tech/sources/teleport.md>)

Topics: [Formal methods](<https://devfeed.tech/topics/formal-methods.md>), [Access Control](<https://devfeed.tech/topics/access-control.md>), [Python](<https://devfeed.tech/topics/python.md>), [Software](<https://devfeed.tech/topics/software.md>), [Open Source](<https://devfeed.tech/topics/open-source.md>), [Software Engineering](<https://devfeed.tech/topics/software-engineering.md>)

Tags: [access-control](<https://devfeed.tech/tags/access-control.md>), [formal-methods](<https://devfeed.tech/tags/formal-methods.md>), [library](<https://devfeed.tech/tags/library.md>), [open-source](<https://devfeed.tech/tags/open-source.md>), [python](<https://devfeed.tech/tags/python.md>), [regex](<https://devfeed.tech/tags/regex.md>), [regular-expressions](<https://devfeed.tech/tags/regular-expressions.md>), [security](<https://devfeed.tech/tags/security.md>), [syntax](<https://devfeed.tech/tags/syntax.md>)

### AI overview

This tutorial explains how to use the Z3 theorem prover to analyze Teleport's role-based access control system. It covers checking whether roles admit the same users to the same nodes and handling constraints involving string equality, regular expressions, interpolation, and basic string functions.

### Source excerpt

Learn how to use Z3 to ask questions about our RBAC system. Are two roles the same?

## Changelog grouping with GoReleaser v1.1

DevFeed: [Changelog grouping with GoReleaser v1.1](<https://devfeed.tech/articles/changelog-grouping-with-goreleaser-v1-1-37750.md>)

Original publisher: [Read original article](<https://carlosbecker.com/posts/goreleaser-changelog-groups/>)

Author: Carlos Alexandro Becker

Published: 2021-12-03T00:00:00Z

Content type: release

Language: en

Sources: [Carlos Becker](<https://devfeed.tech/sources/carlos-becker.md>)

Topics: [changelog](<https://devfeed.tech/topics/changelog.md>), [releases](<https://devfeed.tech/topics/releases.md>), [Release notes](<https://devfeed.tech/topics/release-notes.md>)

Tags: [changelog](<https://devfeed.tech/tags/changelog.md>), [feature](<https://devfeed.tech/tags/feature.md>), [regular-expressions](<https://devfeed.tech/tags/regular-expressions.md>), [release](<https://devfeed.tech/tags/release.md>), [releases](<https://devfeed.tech/tags/releases.md>)

### AI overview

GoReleaser v1.1 introduced changelog groups, a feature that organizes changelogs into categories using regular expressions and exclusion filters. The post includes a usage example and notes that GoReleaser uses the feature for its own releases.

### Source excerpt

In the v1.1 release, GoReleaser introduced a new feature called "changelog groups". This is a quick post to spread the word.

## Loading Python-Defined Regex Constants in Ruby at Runtime

DevFeed: [Loading Python-Defined Regex Constants in Ruby at Runtime](<https://devfeed.tech/articles/yes-yes-yes-importing-constants-from-python-to-ruby-at-execution-time-28311.md>)

Original publisher: [Read original article](<http://fuzzyblog.io/blog/ruby/2020/04/09/yes-yes-yes-importing-constants-from-python-to-ruby-at-execution-time.html>)

Author: Fuzzygroup

Published: 2020-04-09T00:00:00Z

Content type: tutorial

Language: en

Sources: [Scott Johnson](<https://devfeed.tech/sources/scott-johnson.md>)

Topics: [Ruby](<https://devfeed.tech/topics/ruby.md>), [Python](<https://devfeed.tech/topics/python.md>)

Tags: [adl](<https://devfeed.tech/tags/adl.md>), [python](<https://devfeed.tech/tags/python.md>), [regular-expressions](<https://devfeed.tech/tags/regular-expressions.md>), [ruby](<https://devfeed.tech/tags/ruby.md>)

### AI overview

A Ruby-focused technical post explores ways to reuse Python files that define REGEXES arrays in Ruby at runtime. It discusses failed require and require_relative attempts and considers load() under a shared deployment setup.

### Source excerpt

This is going to fall into the category of "Dancing Bear" coding in that it isn't how well it works or how elegant it is, it is that it, like the bear, dances at all. Here's the problem. Three code bases that live in: ohi_kafka/experts-all (python) ohi_kafka/loader_reddit_to_kafka (ruby) ohi_kafka/loader_twitter_to_kafka (ruby) And a series of code modules that define array of regular expressions in a constant always named REGEXES that live in files named like this: common_invective_anti_semitism.py common_invective_anti_black.py common_invective_anti_lgbtq.py common_invective_anti_islam.py common_invective_anti_woman.py Note: A discussion of why the naming conventions here are this way and why lgbtq is lumped here as one thing is beyond the scope of this blog post (I personally disagree with that but I lost that argument months ago; sorry). These regexes need to be run both in the context of the python code base and the ruby code base. These regexes are defined as arrays of strings such as: REGEXES = [ 'foo', 'Bar' ] The magic in making this work is really, really, really understanding your deployment context, specifically: all code will be deployed on the same machine (it will execute across multiple machines) but since I control deploy, I can ensure that the full code stack is present no Docker for the ruby portion - just pretty vanilla Ruby code executing on a server as a SystemD service Being tricksy, very, very tricksy My first attempt to make this work was to try and use an extension with both require and require_relative: require "../experts-all/common_invective_anti_semitism.py" Traceback (most recent call last): 16: from /Users/sjohnson/.rvm/rubies/ruby-2.7.0/lib/ruby/gems/2.7.0/gems/bundler-2.1.2/libexec/bundle:46:in `block in <top (required)>' 15: from /Users/sjohnson/.rvm/rubies/ruby-2.7.0/lib/ruby/2.7.0/bundler/cli.rb:24:in `start' 14: from /Users/sjohnson/.rvm/rubies/ruby-2.7.0/lib/ruby/2.7.0/bundler/vendor/thor/lib/thor/base.rb:476:in `start' 13: fro

## GSoC 2019 - File Search (Final Report)

DevFeed: [GSoC 2019 - File Search (Final Report)](<https://devfeed.tech/articles/gsoc-2019-file-search-final-report-32805.md>)

Original publisher: [Read original article](<https://reactos.org/blogs/gsoc-2019-file-search-final-report/>)

Published: 2019-08-26T00:00:00Z

Content type: article

Language: en

Sources: [Front Page on ReactOS Website](<https://devfeed.tech/sources/front-page-on-reactos-website.md>)

Topics: [like](<https://devfeed.tech/topics/like.md>), [ReactOS](<https://devfeed.tech/topics/reactos.md>), [file](<https://devfeed.tech/topics/file.md>), [Windows](<https://devfeed.tech/topics/windows.md>), [GUI](<https://devfeed.tech/topics/gui.md>), [Regular expression](<https://devfeed.tech/topics/regular-expression.md>)

Tags: [file](<https://devfeed.tech/tags/file.md>), [free](<https://devfeed.tech/tags/free.md>), [gsoc](<https://devfeed.tech/tags/gsoc.md>), [keyboard](<https://devfeed.tech/tags/keyboard.md>), [open-source](<https://devfeed.tech/tags/open-source.md>), [os](<https://devfeed.tech/tags/os.md>), [react](<https://devfeed.tech/tags/react.md>), [reactos](<https://devfeed.tech/tags/reactos.md>), [regular-expressions](<https://devfeed.tech/tags/regular-expressions.md>), [report](<https://devfeed.tech/tags/report.md>), [text](<https://devfeed.tech/tags/text.md>), [win32](<https://devfeed.tech/tags/win32.md>), [winapi](<https://devfeed.tech/tags/winapi.md>), [windows](<https://devfeed.tech/tags/windows.md>)

### AI overview

The article reports completed work on ReactOS's file search project, including a Start menu or keyboard shortcut launch, case-insensitive recursive searching, UTF-16 text-file support, and wildcard file-name filtering. It also notes possible future support for case-sensitive search and regular expressions.

### Source excerpt

This is a summary of all the work that has been completed this summer on the file search project. All contributed code can be found in this GitHub pull request. Summary Here is a list of the main features: Quickly open it from the Start menu or with the keyboard shortcut Windows + F Search is case-insensitive and recurses all sub-folders Support for UTF-16 encoded text files File name filtering with support for wildcards "

## A Working Mathematician's Guide to Parsing

DevFeed: [A Working Mathematician's Guide to Parsing](<https://devfeed.tech/articles/a-working-mathematician-s-guide-to-parsing-40428.md>)

Original publisher: [Read original article](<https://www.jeremykun.com/2019/04/20/a-working-mathematicians-guide-to-parsing/>)

Published: 2019-04-20T17:51:51Z

Content type: tutorial

Language: en

Sources: [Jeremy Kun](<https://devfeed.tech/sources/jeremy-kun.md>)

Topics: [Parsing](<https://devfeed.tech/topics/parsing.md>), [LaTeX](<https://devfeed.tech/topics/latex.md>), [Programming](<https://devfeed.tech/topics/programming.md>), [Code](<https://devfeed.tech/topics/code.md>), [syntax](<https://devfeed.tech/topics/syntax.md>)

Tags: [code](<https://devfeed.tech/tags/code.md>), [guide](<https://devfeed.tech/tags/guide.md>), [latex](<https://devfeed.tech/tags/latex.md>), [parsing](<https://devfeed.tech/tags/parsing.md>), [programming](<https://devfeed.tech/tags/programming.md>), [regular-expressions](<https://devfeed.tech/tags/regular-expressions.md>), [syntax](<https://devfeed.tech/tags/syntax.md>)

### AI overview

This tutorial explains how to convert LaTeX math delimiters for a blog platform when simple find-and-replace is insufficient. It introduces text manipulation approaches, including regular expressions and a program built from scratch, using basic Python or Perl tools.

### Source excerpt

Our hero, a mathematician, is writing notes in LaTeX and needs to convert it to a format that her blog platform accepts. She's used to using dollar sign delimiters for math mode, but her blog requires \( \) and \[ \]. Find-and-replace fails because it doesn't know about which dollar sign is the start and which is the end. She knows there's some computer stuff out there that could help, but she doesn't have the damn time to sort through it all.

## Regular Expressions and Grouping Sets

DevFeed: [Regular Expressions and Grouping Sets](<https://devfeed.tech/articles/regular-expressions-and-grouping-sets-34563.md>)

Original publisher: [Read original article](<https://tapoueh.org/blog/2017/08/regular-expressions-and-grouping-sets/>)

Author: Dimitri Fontaine PostgreSQL Major Contributor; Author

Published: 2017-08-14T14:37:53Z

Content type: tutorial

Language: en

Sources: [Dimitri Fontaine](<https://devfeed.tech/sources/dimitri-fontaine.md>)

Topics: [PostgreSQL](<https://devfeed.tech/topics/postgresql.md>), [Regular expression](<https://devfeed.tech/topics/regular-expression.md>), [SQL](<https://devfeed.tech/topics/sql.md>), [data-processing](<https://devfeed.tech/topics/data-processing.md>), [Open Data](<https://devfeed.tech/topics/open-data.md>), [Structured-data](<https://devfeed.tech/topics/structured-data.md>), [CSV](<https://devfeed.tech/topics/csv.md>), [elt](<https://devfeed.tech/topics/elt.md>), [etl](<https://devfeed.tech/topics/etl.md>)

Tags: [array](<https://devfeed.tech/tags/array.md>), [csv](<https://devfeed.tech/tags/csv.md>), [data-processing](<https://devfeed.tech/tags/data-processing.md>), [elt](<https://devfeed.tech/tags/elt.md>), [etl](<https://devfeed.tech/tags/etl.md>), [functions](<https://devfeed.tech/tags/functions.md>), [postgresql](<https://devfeed.tech/tags/postgresql.md>), [regexp](<https://devfeed.tech/tags/regexp.md>), [regular-expressions](<https://devfeed.tech/tags/regular-expressions.md>), [sql](<https://devfeed.tech/tags/sql.md>), [table](<https://devfeed.tech/tags/table.md>)

### AI overview

A PostgreSQL tutorial showing how to split hierarchical, comma-separated values from a messy column with regular-expression functions, normalize the results, and analyze category distributions with grouping sets, CUBE, and ROLLUP. It also contrasts ETL with ELT.

### Source excerpt

There's a very rich set of PostgreSQL functions to process text, you can find them all at the String Functions and Operators documentation chapter, with functions such as overlay, substring, position or trim. Or aggregates such as string_agg. And then regular expression functions, including the very powerful regexp_split_to_table.

## Translating English Sentences into Propositional Logic Statements

DevFeed: [Translating English Sentences into Propositional Logic Statements](<https://devfeed.tech/articles/translating-english-sentences-into-propositional-logic-statements-40533.md>)

Original publisher: [Read original article](<http://nbviewer.ipython.org/url/norvig.com/ipython/PropositionalLogic.ipynb>)

Published: 2016-10-01T00:00:00Z

Content type: tutorial

Language: en

Sources: [Peter Norvig](<https://devfeed.tech/sources/peter-norvig.md>)

Topics: [Math and Logic](<https://devfeed.tech/topics/math-and-logic.md>), [function](<https://devfeed.tech/topics/function.md>)

Tags: [logic](<https://devfeed.tech/tags/logic.md>), [program](<https://devfeed.tech/tags/program.md>), [regular-expressions](<https://devfeed.tech/tags/regular-expressions.md>), [rules](<https://devfeed.tech/tags/rules.md>), [translation](<https://devfeed.tech/tags/translation.md>)

### AI overview

This tutorial presents a program that translates many informal English sentences into formal propositional-logic statements. It explains an ordered set of translation rules, recursive processing, propositional-symbol definitions, regular expressions, and test cases, while noting that the approach is limited and can produce errors.

### Source excerpt

Automatically converting informal English sentences into formal Propositional Logic.

## The Many Faces of Set Cover

DevFeed: [The Many Faces of Set Cover](<https://devfeed.tech/articles/the-many-faces-of-set-cover-40382.md>)

Original publisher: [Read original article](<https://www.jeremykun.com/2015/05/04/the-many-faces-of-set-cover/>)

Published: 2015-05-04T09:00:00Z

Content type: tutorial

Language: en

Sources: [Jeremy Kun](<https://devfeed.tech/sources/jeremy-kun.md>)

Topics: [Algorithms, Complexity](<https://devfeed.tech/topics/algorithms-complexity.md>), [Regular expression](<https://devfeed.tech/topics/regular-expression.md>), [Databases](<https://devfeed.tech/topics/databases.md>)

Tags: [algorithm](<https://devfeed.tech/tags/algorithm.md>), [approximation-algorithms](<https://devfeed.tech/tags/approximation-algorithms.md>), [expression](<https://devfeed.tech/tags/expression.md>), [mathematics](<https://devfeed.tech/tags/mathematics.md>), [np](<https://devfeed.tech/tags/np.md>), [np-hard](<https://devfeed.tech/tags/np-hard.md>), [programming](<https://devfeed.tech/tags/programming.md>), [regex](<https://devfeed.tech/tags/regex.md>), [regex-golf](<https://devfeed.tech/tags/regex-golf.md>), [regular-expressions](<https://devfeed.tech/tags/regular-expressions.md>), [set-cover](<https://devfeed.tech/tags/set-cover.md>)

### AI overview

This tutorial explains the set cover problem and connects it to regex golf. It shows how selected regular expressions can be combined to cover desired strings while avoiding unwanted matches, and notes that set cover is NP-hard, motivating approximation algorithms.

### Source excerpt

A while back Peter Norvig posted a wonderful pair of articles about regex golf. The idea behind regex golf is to come up with the shortest possible regular expression that matches one given list of strings, but not the other. "Regex Golf," by Randall Munroe. In the first article, Norvig runs a basic algorithm to recreate and improve the results from the comic, and in the second he beefs it up with some improved search heuristics.

## Using trigrams against typos

DevFeed: [Using trigrams against typos](<https://devfeed.tech/articles/using-trigrams-against-typos-34520.md>)

Original publisher: [Read original article](<https://tapoueh.org/blog/2013/09/using-trigrams-against-typos/>)

Author: Dimitri Fontaine PostgreSQL Major Contributor; Author

Published: 2013-09-06T14:15:00Z

Content type: tutorial

Language: en

Sources: [Dimitri Fontaine](<https://devfeed.tech/sources/dimitri-fontaine.md>)

Topics: [PostgreSQL](<https://devfeed.tech/topics/postgresql.md>), [Extension](<https://devfeed.tech/topics/extension.md>), [Database](<https://devfeed.tech/topics/database.md>)

Tags: [auto-completion](<https://devfeed.tech/tags/auto-completion.md>), [extension](<https://devfeed.tech/tags/extension.md>), [postgresql](<https://devfeed.tech/tags/postgresql.md>), [regular-expressions](<https://devfeed.tech/tags/regular-expressions.md>), [search](<https://devfeed.tech/tags/search.md>)

### AI overview

This tutorial explains how PostgreSQL's pg_trgm extension can support approximate string matching, typo-correction suggestions, autocomplete, and searches involving POSIX regular expressions. It contrasts trigram-based matching with PostgreSQL full-text search and introduces a product-catalog example.

### Source excerpt

In our ongoing Tour of Extensions we played with earth distance in How far is the nearest pub? then with hstore in a series about trigger, first to generalize Trigger Parameters then to enable us to Auditing Changes with Hstore. Today we are going to work with pg_trgm which is the trigrams PostgreSQL extension: its usage got seriously enhanced in recent PostgreSQL releases and it's now a poor's man Full Text Search engine.

## Regular expressions obfuscation under the microscope

DevFeed: [Regular expressions obfuscation under the microscope](<https://devfeed.tech/articles/regular-expressions-obfuscation-under-the-microscope-39688.md>)

Original publisher: [Read original article](<https://doar-e.github.io/blog/2013/08/24/regular-expressions-obfuscation-under-the-microscope/>)

Author: Axel "0vercl0k" Souchet

Published: 2013-08-24T19:35:00Z

Content type: tutorial

Language: en

Sources: [Diary of a reverse-engineer](<https://devfeed.tech/sources/diary-of-a-reverse-engineer.md>)

Topics: [obfuscation](<https://devfeed.tech/topics/obfuscation.md>), [Finite-state machine](<https://devfeed.tech/topics/finite-state-machine.md>), [Regular expression](<https://devfeed.tech/topics/regular-expression.md>), [Reverse Engineering](<https://devfeed.tech/topics/reverse-engineering.md>), [Assembly](<https://devfeed.tech/topics/assembly.md>), [C](<https://devfeed.tech/topics/c.md>)

Tags: [assembly](<https://devfeed.tech/tags/assembly.md>), [c](<https://devfeed.tech/tags/c.md>), [obfuscation](<https://devfeed.tech/tags/obfuscation.md>), [regex](<https://devfeed.tech/tags/regex.md>), [regular-expressions](<https://devfeed.tech/tags/regular-expressions.md>), [reverse-engineering](<https://devfeed.tech/tags/reverse-engineering.md>)

### AI overview

This tutorial explains how regular expressions can be compiled into finite-state machines and represented directly in assembly or C, making them harder to analyze. It demonstrates a simple manual implementation and discusses recognizing and obfuscating compiled regexes during reverse-engineering work.

### Source excerpt

Introduction Some months ago I came across a strange couple of functions that was kind of playing with a finite-state automaton to validate an input. At first glance, I didn't really notice it was in fact a regex being processed, that's exactly why I spent quite some time to understand ...

## Regexp performances and Finite Automata

DevFeed: [Regexp performances and Finite Automata](<https://devfeed.tech/articles/regexp-performances-and-finite-automata-34389.md>)

Original publisher: [Read original article](<https://tapoueh.org/blog/2010/09/regexp-performances-and-finite-automata/>)

Author: Dimitri Fontaine PostgreSQL Major Contributor; Author

Published: 2010-09-26T19:00:00Z

Content type: article

Language: en

Sources: [Dimitri Fontaine](<https://devfeed.tech/sources/dimitri-fontaine.md>)

Topics: [Automaton](<https://devfeed.tech/topics/automaton.md>), [Regular expression](<https://devfeed.tech/topics/regular-expression.md>), [Parser](<https://devfeed.tech/topics/parser.md>), [PostgreSQL](<https://devfeed.tech/topics/postgresql.md>), [Perl](<https://devfeed.tech/topics/perl.md>), [Ruby](<https://devfeed.tech/topics/ruby.md>), [Emacs](<https://devfeed.tech/topics/emacs.md>)

Tags: [dfa](<https://devfeed.tech/tags/dfa.md>), [emacs-lisp](<https://devfeed.tech/tags/emacs-lisp.md>), [perl](<https://devfeed.tech/tags/perl.md>), [postgresql](<https://devfeed.tech/tags/postgresql.md>), [regexp](<https://devfeed.tech/tags/regexp.md>), [regular-expressions](<https://devfeed.tech/tags/regular-expressions.md>), [ruby](<https://devfeed.tech/tags/ruby.md>)

### AI overview

This article examines regular-expression performance through the lens of finite automata, contrasting NFA and DFA-based implementation techniques. It also discusses PostgreSQL's regular-expression implementation and the author's preference for using awk in some file-searching situations.

### Source excerpt

The major reason why I dislike perl so much, and ruby too, and the thing I'd want different in the Emacs Lisp API so far is how they set developers mind into using regexp. You know the quote, don't you? Some people, when confronted with a problem, think "I know, I'll use regular expressions." Now they have two problems. That said, some situations require the use of regexp -- or are so much simpler to solve using them than the maintenance hell you're building here ain't that big a drag. The given expressiveness is hard to match with any other solution, to the point I sometime use them in my code (well I use rx to lower the burden sometime, just see this example).