#regex

[ follow ]
fromMathspp
10 hours ago

TIL 131 - Change casing in search & replace

VS Code has a search & replace feature that lets you use regex to look for patterns and then reference groups in the replacement... But it lets you do something else that's really cool. Changing casing with special sequences When you are replacing groups, you can use special sequences to change the casing of the group you're inserting, according to the following table: The picture below shows an example of a search & replace operation where I looked for the text "all in one go".
Python
fromNedbatchelder
1 week ago
Python

Finding unneeded pragmas

A tool detects coverage.py exclusion pragmas that were executed, helping identify exclusions that may no longer be necessary.
JavaScript
frompawelgrzybek.com
2 months ago

What's new in ECMAScript 2025 | pawelgrzybek.com

ES2025 introduces new features such as enhanced regex capabilities, improved Set methods, subexpression modifiers, and a new import type attribute.
fromgithub.com
1 month ago

GitHub - JakeRoggenbuck/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.

Regolith is a server-side library that provides a safe Regex alternative in TypeScript and JavaScript, protecting against Regular Expression Denial of Service (ReDoS) attacks.
Web development
#japanese-addresses
fromMedium
2 months ago
Scala

Japanese Addresses Aren't Hard-You're Just Using Regex

Japanese addresses are complex and require context for accurate parsing, rather than relying on regex alone.
fromMedium
2 months ago
Scala

Japanese Addresses Aren't Hard-You're Just Using Regex

Japanese addresses are complex due to their structural and contextual nature, making regex ineffective for parsing them accurately.
Scala
fromMedium
4 months ago

Solving Coding Challeng: Code Comment Remover-Part 2

Implementing Go-style comments involves preserving doc comments while removing non-doc comments using regex.
fromNedbatchelder
4 months ago

Regex affordances

The regex is written in verbose syntax to enhance readability, allowing whitespace and comments, which aids in understanding the structure of the pattern.
[ Load more ]