Latest Tech News

Stay updated with the latest in technology, AI, cybersecurity, and more

Filtered by: regex Clear Filter

Show HN: Regolith – Regex library that prevents ReDoS CVEs in TypeScript

Regolith A server-side TypeScript and JavaScript library immune to Regular Expression Denial of Service (ReDoS) attacks by using Rust and linear Regex under the hood. Regolith has a linear worst case time complexity, compared to the default RegExp found in TypeScript and JavaScript, which has an exponential worst case. Motivation: I wanted a Regex library for TypeScript and JavaScript where I didn't have to worry about ReDoS attacks. Important Regolith is still early in development! We need h

The /o in Ruby regex stands for "oh the humanity "

Your code using the /o modifier Source: wikipedia Hi there! Do you like Regex? Do you like performance? Do you like creating confounding bugs for yourself rooted in the mechanics of the Ruby VM itself? If you said yes to all of the above, have I got a feature for you! But first, let’s start with a story. The cliffs of insanity I was recently reviewing some code, and part of the functionality was about matching. A class took an array of strings, and you could call a method to see if an input

Topics: code end regex ruby run

Coverage.py Regex Pragmas

Coverage.py uses regexes to define pragma syntax. This is surprisingly powerful. Coverage.py lets you indicate code to exclude from measurement by adding comments to your Python files. But coverage implements them differently than other similar tools. Rather than having fixed syntax for these comments, they are defined using regexes that you can change or add to. This has been surprisingly powerful. The basic behavior: coverage finds lines in your source files that match the regexes. These lin

Adding lookbehinds to rust-lang/regex

In a previous blogpost, Erik wrote about how he implemented the linear time matching algorithm from [RegElk+PLDI24] in the popular regex engine RE2. In this one, we're looking at how to do the same thing for the official regex engine from the Rust language. Namely, we add support for unbounded captureless lookbehinds. First, let's discover the newly supported feature and its limitations. Lookbehinds allow regexes to make assertions about things preceding some part of the regex pattern without c

More than 1 in 5 Show HN posts are now AI-related, get > half the votes/comments

More than 1 in 5 Show HN posts are now AI-related, but get less than half the votes or comments. _ The idea for this article didn't exist in my brain before this morning. But there I was, scrolling the New page and even more tired of all the AI-related Show HN posts than usual. I was confident that their numbers were multiplying and wanted proof. Exactly how much more AI crap is on my lawn compared to last year? Full disclosure: I'm not a data guy. Everything below was off the top of my head. N

The fastest way to detect a vowel in a string

Austin Z. Henley Associate Teaching Professor Carnegie Mellon University [email protected] @austinzhenley github/AZHenley The fastest way to detect a vowel in a string 6/13/2025 I was nerdsniped recently: What is the best way to detect if a string has a vowel in it? This is trivial, right? But as I started getting into it, I realized there is much more to this. I challenged myself to come up with as many ways to detect a vowel as possible. I even asked a few friends to give it a go. Whi