Nicolas Buduroi · @budu
27 followers · 109 posts · Server ruby.social

#regexp

Last updated 2 years ago

Todd A. Jacobs · @todd_a_jacobs
23 followers · 250 posts · Server ruby.social

While using a single, complex seems like a time-saver to some people, it also makes breaking down transformations and validations into discrete, testable steps a lot harder. In , many String and Array methods are faster than their regexp counterparts, too.

I generally prefer to see code that is more testable rather than a really complex regexp that attempts to validate, capture, and transform within a single expression. YMMV.

stackoverflow.com/a/77069482/1

#regexp #rubylang

Last updated 2 years ago

Robert Watkins · @twasink
51 followers · 778 posts · Server aus.social

Spelling question: vs

#regex #regexp

Last updated 2 years ago

Adrian Dymorz · @adrian
365 followers · 651 posts · Server mastodon.peaceful.social

Der Filter funktioniert nicht und ist wieder gelöscht. "X" am Anfang, Schluss oder vor einem Doppelpunkt oder Bindestrich werden nicht gefunden. Zudem ist ein Buchstabe zu beliebig, um einen Filter dafür zu machen.

Technische Details: Am Anfang waren die Filter in Mastdon als reguläre Ausdrücke umgesetzt. Das war zwar nicht benutzerfreundlich, würde hier aber helfen.

#filter #mastodon #regexp

Last updated 2 years ago

gram · @orsinium
67 followers · 231 posts · Server fosstodon.org

@edsuom There is something in it, actually. In certain situations, a proper explanation for a would take more than regular [programming language name] code, and that's when it's time to rewrite it. Readable code is always better than comments because comments can lie.

#regexp

Last updated 2 years ago

Luke T. Shumaker · @lukeshu
10 followers · 132 posts · Server fosstodon.org

I was being facetious, but real learning about performance:

It naively walks the string from beginning to end. So while checking re("^foo").MatchString(str) is going to perform not so different from strings.HasPrefix(str, "foo"), checking re("bar$").MatchString(str) is going to be *way* slower than strings.HasSuffix(str, "bar"), especially for long strings, because it has to walk the entire string instead of just jumping to the end.

(Accurate as of Go 1.20.5)

#golang #regexp

Last updated 2 years ago

Luke T. Shumaker · @lukeshu
10 followers · 132 posts · Server fosstodon.org

doesn't implement backtracking because it's slow.

... so why does the CPU profile tell me this program is spending all its time in regexp.(*Regexp).tryBacktrack() ?

#golang #regexp

Last updated 2 years ago

Nicolas Delsaux · @Riduidel
239 followers · 2249 posts · Server framapiaf.org

J'ai du mal à comprendre comment ça peut marcher avec tous les nombres premiers ... mais ça a l'air d'une idée fun noulakaz.net/2007/03/18/a-regu

#programming #hack #regexp #mathematiques

Last updated 2 years ago

Fast Junkie 💀 · @fast_junkie
1 followers · 36 posts · Server mas.to

Wanted to try out

... they clearly have antiquated ...

Not a single one of my VERY valid emails where acceptable...

#MovingOn #regexp #email #very #lmao #rapidapi

Last updated 2 years ago

Mark Gardner ‍:sdf: · @mjgardner
661 followers · 4097 posts · Server social.sdf.org

@regehr @commodore @dev There is even a (low-severity, a/k/a “cruel”) policy to discourage everything but $_, @_, $], and numbered capture variables: metacpan.org/pod/Perl::Critic:

metacpan.org/pod/Perl::Critic: already protects you against the performance-sapping $`, $&, and $' match variables

And you can configure your own prohibited list with metacpan.org/pod/Perl::Critic:

#perlcritic #regularexpression #perl #regex #regexp #regexes #regexps

Last updated 2 years ago

Mozilla News & Updates · @moznews
804 followers · 1667 posts · Server noc.social

Check out the comprehensive Regular Expressions Reference on MDN Web Docs and supercharge your coding skills! 💪👩‍💻👨‍💻 - developer.mozilla.org/en-US/bl

Original tweet : twitter.com/MozDevNet/status/1

#regexp #mdnblogupdate

Last updated 2 years ago

Mozilla News & Updates · @moznews
797 followers · 1637 posts · Server noc.social

MDN Web Docs's new reference pages on regular expressions are a game changer, with examples of capturing groups, named capturing groups, and more. Up your RegExp knowledge 🙌 developer.mozilla.org/en-US/bl

Original tweet : twitter.com/MozDevNet/status/1

#regexp #javascript

Last updated 2 years ago

OSiUX · @osiux
101 followers · 81 posts · Server rebel.ar
GNU/Linux.ch · @gnulinux
5115 followers · 3742 posts · Server social.anoxinon.de

Grep mit mehreren Strings

Durch die geschickte Verkettung von Suchbegriffen kann man mithilfe von grep Dateien auf mehrere Begriffe hin untersuchen.

gnulinux.ch/grep-mit-mehreren-

#grep #regexp #linux

Last updated 2 years ago

Mark Gardner ‍:sdf: · @mjgardner
592 followers · 3199 posts · Server social.sdf.org
Aral Balkan · @aral
33138 followers · 24066 posts · Server mastodon.ar.al

A useful little site for testing the equivalence of two regular expressions:

bakkot.github.io/dfa-lib/regeq

#regularexpressions #regexp #programming #dev

Last updated 2 years ago

Celfred · @celfred
290 followers · 822 posts · Server framapiaf.org

Une AI qui aide à générer ses expressions régulières ?

Regex.ai - Aritifical Intelligence Regular Expression Generator
regex.ai/

#shaarli2mastodon #dev #regexp

Last updated 2 years ago

ksenosbyte :emacs: · @darkawower
16 followers · 34 posts · Server emacs.ch

An interesting tool for building regexes efficiently with magic-regexp reminded me of the rx library in emacs lisp.🙂

regexp.dev/

#typescript #javascript #regexp

Last updated 3 years ago

Yes, I Know IT ! 🎓 · @YesIKnowIT
668 followers · 3732 posts · Server mastodon.social

In JavaScript the "empty" regular expression literal is written `/(?:)/` since the parser would erroneously take `//` as the start of a single-line comment

ecma-international.org/ecma-26

#javascript #ecma #empty #regexp

Last updated 3 years ago

Axel Rauschmayer · @rauschma
3999 followers · 1603 posts · Server fosstodon.org