FULL-FIFO DEVELOPER 🇺🇦🇨🇿 (@[email protected])
tfw you learn your ai girlfriend is actually a regexp
tfw you learn your ai girlfriend is actually a regexp
TIL: in javascript regexes, \b (word boundary) matches between an umlaut and a regular letter:
"aaäaaöaa".replaceAll(/\b\w/g, (x) => x.toUpperCase()) results in "AaäAaöAa"
ё особенная и не входит в него.
RegExp lastIndex Mutates Global Matches?!
Global regex has MEMORY! The lastIndex property remembers where it stopped. Reset it to 0 and the same regex matches DIFFERENTLY. This mutation behavior will cause bugs you'll never find!
#javascript #javascripttricks #regexp #lastindex #globalregex #javascriptweird #javascriptquiz #codingchallenge #javascriptshorts #javascriptwtf #regexmutation #advancedjavascript

Need a #regexp sanity check from someone else who actually knows their regexp
I was using the following regexp to find empty spans to remove.
<span style=".*?"><\/span>
My understanding is that the ? means it'll find the smallest valid match that's followed by "></span>
that _worked_ for YEARS in one of my codebases and now it's matching across multiple spans.
<span style="[^"]*"><\/span>
is the fix BUT my question is _should I even NEED a fix?_
I prefer Gryphon, but ydy.
NOTE: this was originally published on the older version of this blog, some content may be broken/outdated.
Following a discussion on hacker news I have found myself wondering about regular expressions in ruby 1.9.
In this major version ruby switched its regex engine to oniguruma (and, since a few days ago to a fork of it called Onigmo ).
This engine is widely more powerful than the […]
https://riffraff.info/2012/02/matching-nested-structures-with-regexps-in-ruby-1-9/
NOTE: this was originally published on the older version of this blog, some content may be broken/outdated. Following a discussion on hacker news I have found myself wondering about regular expressions in ruby 1.9. In this major version ruby switched its regex engine to oniguruma (and, since a few days ago to a fork of it called Onigmo ). This engine … Continue reading "Matching nested structures with Regexps in Ruby 1.9"
Holy guacamole, Batman! You can use regular expressions in #LibreOffice Calc!
This makes me unreasonably happy. (Why did I stick with MS Office so long?)