#regex — Public Fediverse posts
Live and recent posts from across the Fediverse tagged #regex, aggregated by home.social.
-
Regular expressions are very powerful, yet can be tricky to create.
Would you like to see a set of "challenges" that we complete and learn from together?
Conditions:
- No outside help (websites, AI, local tools)
- No peeking in the answers
- We have to decide on a single tool that works on #Linux and #BSD using the same regex engine -
Thank you!
Sad thing is that regex101.com is not reachable over #IPv6 because they still did not fix
https://github.com/firasdib/Regex101/issues/2569 -
Regex101 but in your terminal!
👀 **regexplain** — A TUI for explaining and visualizing regular expressions
💯 See what each part of your regex does and how it matches your input
🦀 Written in Rust & built with @ratatui_rs
⭐ GitHub: https://github.com/kapilpokhrel/regexplain
#rustlang #ratatui #tui #regex #terminal #devtools #opensource
-
https://regex101.com/r/lA9sen/1/unit-tests
In case anyone needs a #regex to match #IPv6 correctly, here you go. If you find a bug, let me know. Might be helpful if you need to redact some logs.
-
Chuck Norris searched using #RegEx, and found everything and everyone that's ever been lost.
This includes moments previously thought to be lost in time (like tears in the rain), the Antarctic Snow Cruiser, the golden plates, The Lost Symbol, Raubgold, Niobe, and the Ark of the Covenant. Also Butch Cassidy, Lord Lucan, Jimmy Hoffa, and Elijah, Moses, and Enoch. -
“A computer whose only instruction is a global regex substitution, applied over and over to one long string. That turns out to be enough to run DOOM.”
🤯
-
Turns out, reLint is a great AI companion. I have a clause in my AGENTS.md to try to record all of my coding style review comments as reLint rules.
Next time an agent works on something, they get automatic feedback before they can even commit new work.
https://github.com/codingjoe/relint
#ai #regex #linter #agent #agentic #foss #openSource #python #djano
-
-
🚀 Wow, a 2012 screed on regular expressions! Because nobody knew about their "true power" before this 🙄. Congratulations on discovering that #regex can sometimes parse HTML—surely a revelation for the ages. 🤦♂️ #RegexRevolution
https://www.npopov.com/2012/06/15/The-true-power-of-regular-expressions.html #RegularExpressions #HTML #Parsing #DeveloperHumor #TechNews #HackerNews #ngated -
YOU GUYS HOLY FUCK M-x re-builder
DEAR GOD IN HEAVEN I PREVIOUSLY IGNORED IT LIKE I CAN WRITE REGULAR EXPRESSIONS WHY DEAL WITH THIS FUSSY THING
I WAS BLIND BUT NOW I SEE FORGIVE ME LORD THE SCALES HAVE FALLEN FROM MY FOOLISH EYES
-
Regex tools are the genAI antidote.
They do right what genAI does wrong.
#regex #RegularExpressions #noLLM #StopTheAICorruption #zuzai
-
Absolutely. Regex for the millions!
Regex, even at a very basic level, is the most effective productivity booster for everyone dealing with texts, ie, everyone.
The complete absence of any regex competence among almost all professionals (except programmers) has always baffled me.
If we could replace wordprocessors by TeX and Regex, everywhere, we'd liberate everyone from the most mind-numbing battles with their document processing software. Uncounted unpleasant work hours saved, at zero cost. No need to spend hundreds of billions of dollars on water-guzzling data centres to make it happen! Just a few quiet hours of training, between friends.
The analogy to basic arithmetic is apt. An essential life skill that doesn't come naturally to most people but that can be acquired by all.
-
Рекурсия в RegEx с условиями выхода
Для создания подсветки синтаксиса мне требовалось регулярное выражение, которое может подсветить разные фрагменты пути. При этом оно должно следовать условию "только путь в кавычках" и обходить мимо переменные, продолжная парсинг пути. В этой статье мы разберем, каким образом написать такое выражение, как работает рекурсия в RegEx, как добавить условие выхода из нее. Посмотрим, как пропускать целые фрагменты текста.
https://habr.com/ru/articles/1064614/
#regex #регулярки #регулярные_выражения #регулярное_выражение #парсинг #обработка_текста #рекурсия #цикл #подсветка_синтаксиса #Notepad++
-
Artem Lytkin has implemented Doom with just regular expressions. A giant pile of search-and-replace—14M in just one frame! This is magnificent:
https://4rh1t3ct0r7.github.io/doom-regex/
#regex #doom h/t @hackaday -
Test, debug, and match your Regex patterns in real time with this free online tool.
🔒 Client-side testing
⚡ Real-time matching
https://geniedevs.blogspot.com/2026/07/regex-tester.html #WebDev #Regex #DevTools
-
Бенчмаркая Regex: конструктор показал 10 мкс, первый вызов — 1307
Проверить строку регулярным выражением в .NET можно по-разному, но совет всегда один: включите RegexOptions.Compiled или возьмите генератор. Замеры это подтверждают. А вот подготовка выражения оказалась не там, где её меряют: конструктор занимает 10 микросекунд, а первая же проверка на этом объекте — ещё 1307. Разобрался, куда уходит разница, и заодно нашёл границу, на которой статический Regex.IsMatch резко замедляется.
https://habr.com/ru/articles/1063204/
#regex #generatedregex #regexoptions #benchmarkdotnet #jit #кэш #производительность #регулярные_выражения #net_10 #string
-
> There once was a master programmer who wrote unstructured programs. A novice programmer, seeking to imitate him, also began to write unstructured programs. When the novice asked the master to evaluate his progress, the master criticized him for writing unstructured programs, saying, "What is appropriate for the master is not appropriate for the novice. You must understand the Tao before transcending structure."
> -- The Tao of Programming, Book 3I've been doing this for decades; I _know_ that using regex to parse HTML is wrong. I know that unwrapping DIVs by searching for <div>...</div> will mispair nested closing tags. I don't care because I also know that in my input data the only DIV tags that exist are there because they need unwrapping and the end result will be the same even for the error. Do as the master says, not as the master does.
Of course this does make me ponder why we don't have "regex for XML", some kind of sed-like one-liner that can recombobulate XML using CSS/XSLT and a parse tree rather than spicy string searching.
-
#Regex—the Q-tips of the #programming world. No matter how often you’re told never to clean #HTML with regex, you do it anyway
-
Does anybody else here use Wordle to keep their `awk` skills fresh?
-
Still one of my favorite StackOverflow answers.
-
Атомарные регулярные выражения
Регулярные выражение обладают возможностями отслеживания пройденного пути и рефлексией. Разберемся, как использовать эти возможности для захвата фрагментов текста, как применить к ним цвет и вывести в консоль.
https://habr.com/ru/articles/1057658/
#regex #регулярки #регулярные_выражения #парсинг #pcre #алгоритмы #изучение_программирования #autohotkey #регулярное_выражение #regular_expressions
-
I've been riding a #nerd #high since late June and here is one of the results.
https://codeberg.org/tnalpgge/cabrillo-el
While it is not directly responsible for helping me #slice and #dice our #hamradio contact logs from this past #FieldDay, it did eliminate the need for a bunch of #shell and #awk that I was using previously. Of course, by replacing some compact, proven scripts by a larger library of #Emacs #Lisp is more of an exercise in #purity than #practicality. Still, playing with #peg and formal-ish grammars was an interesting alternative to my traditional #regex approach to text processing.
It's not a thorough test suite, but it did help me catch two bugs this evening!