mimoblog, to RegEx

Dans les préférences de filtre de mots Calckey, je lis: «pour utiliser des expressions régulières (regex), mettez les mots-clés entre barres obliques». Pour donner un exemple, si je mettais les mots expression | régulière dans le filtre, ça veut dire de filtrer expression ou régulière ? Et est-ce que d'autres caractères sont utilisables pour filtrer? #ExpressionsRégulière #Regex

mjgardner, to raku
@mjgardner@social.sdf.org avatar
timbray, to random
@timbray@cosocial.ca avatar

Hey, a minor announcement: An IETF thing I helped with has been approved and will be getting an RFC number in a few weeks: https://www.ietf.org/archive/id/draft-ietf-jsonpath-iregexp-08.html

A small-ish subset of regular expression syntax/semantics, should work interoperably across the (many) popular regexp implementations.

Mostly for use in other specifications I think?

aegilops,

@timbray I wonder how close the match is to #Hyperscan. That’s Intel’s high-perf regex engine, which disallows backreferences, lookarounds and capture groups, much like I-Regex.

https://www.intel.com/content/www/us/en/developer/articles/technical/introduction-to-hyperscan.html

If you want more fodder for considering which regexes would work in your spec, they have a corpus of thousands available.

Hyperscan does allow ., \s, \d and so on, so you’re even stricter!

#regex

aegilops, to github

I’ve released more GitHub :github: Secret 🔑 Scanning 🔎 custom patterns, which you can use with Advanced Security.

Some are 🔥 (IMHO), some are for auditing only - e.g. my “common passwords” pattern, written to spot some of the most commonly leaked weak passwords - “P@55word123!” etc.

We have DataDog, Sentry, .Net configs, MS SQLServer user creation, and Bearer tokens.

https://aegilops.github.io/posts/new-github-secret-scanning-custom-patterns/

#GitHub #SecretScanning #AppSec #SDLC #regex

hywan, to RegEx
@hywan@fosstodon.org avatar

Hyperscan, https://github.com/intel/hyperscan.

> Hyperscan is a high-performance multiple regex matching library. It follows the regular expression syntax of the commonly-used libpcre library, but is a standalone library with its own C API.
>
> Hyperscan uses hybrid automata techniques to allow simultaneous matching of large numbers (up to tens of thousands) of regular expressions and for the matching of regular expressions across streams of data.

#regex #engjne #performance

atoponce, to RegEx
@atoponce@fosstodon.org avatar

Regular expression hexagonal crossword puzzle.

#regex #programming

hywan, to RegEx
@hywan@fosstodon.org avatar

rebar, https://github.com/BurntSushi/rebar.

rebar is a biased barometer for gauging the relative speed of some regex engines on a curated set of tasks.

The work done here is incredible. If you’re interested by regex engine benchmarks, this is pure cold. The amount of documentation is insane.

#performance #benchmark #regex

hywan, to rust
@hywan@fosstodon.org avatar

Regex engine internals as a library, https://blog.burntsushi.net/regex-internals/.

An incredible and must-read blog post explaining the internals of the regex Rust crate. How it has moved from a “monolithic” to a “multi-library” project. It explains in details the problems regex engines have to deal with, the importance of literal optimisations, the NFA data type, and the various regex engines that are implemented (incl. a meta engine, to rule them all).

It’s now 1.5 times faster on average 👌.

morax, to RegEx
@morax@satanodon.com avatar
DigitalStefan, to RegEx

Fixing the GA4 ecommerce 1 tag trick: https://tagmanaging.page/2023/07/04/fixing-the-ga4-ecommerce-1-tag-trick/

Alt title: RegEx is difficult, but publications have a responsibility toward accuracy.

#gtm #googletagmanager #ga4 #regex

GlenDownton, to ChatGPT
@GlenDownton@mastodon.au avatar

As a long term professional software developer, I have a healthy scepticism for the capabilities of the new waves of AI systems (if you know how the sausage is made, etc ..)

But if there is one domain they are perfect for - albeit very niche - it's generating regular expression patterns from natural language descriptions of the intended match.

They're explicit, not open to interpretation (unlike, apparently, the explicit laws of cricket) and immediately verifiable.

#ChatGPT even gives a little explanation of the generated expression. Although it could turn down the Sirius Cybernetics Corporation perkiness a bit!

#software #softwaredev #regex #AI

isomeme, to RegEx
@isomeme@mastodon.sdf.org avatar

I consider myself an expert in regular expressions, yet finding out that a very simple regex can determine whether a number is prime just exploded my brain. Note that while the regex given in the article matches strings of 1s, that's totally incidental. You can easily modify the regex to use strings of any single repeated character. What's really being tested is whether the length of a string is prime.

https://www.noulakaz.net/2007/03/18/a-regular-expression-to-check-for-prime-numbers/

#regex #computing #mathematics

ernir, to RegEx

Was writing a #regex. Thought this was a perfect time to use one of those newfangled #AI things (#ChatGPT), this kind of well specified problem requiring boring arcane syntax should be right up its alley

It spat it out near instantly, the running example showing exactly what I would expect

Only, the actual regex created and shown in the example isn't even syntactically valid

fkinoshita, to GNOME

Streamlined Wildcard layout and added a dialog to switch regex flags on/off.

Still want to add a few functions like replacing matching content, etc... but overall pretty happy with how the app is turning out! :)

#GNOME #GTK #libadwaita #regex

A libadwaita application called "Wildcard", the main window presents a text view for the testing string and a input row to insert the actual regex string, below that there's another that opens up a dialog for switching regex flags on and off.

nixCraft, to random
@nixCraft@mastodon.social avatar

I am 100% convinced that no one actually knows regex.*

amarok,
@amarok@mastodonczech.cz avatar

@nixCraft
Our cats do know!
#regex #geekhumor 😃

mgorny, to RegEx

So following @thesamesam's complaint that cargo.eclass is slowing dev-python/* down (sigh), I've proposed a few changes to speed it up. Notably:

  1. Variable-based API instead of $(cargo_crate_uris), like python-r1 does.

  2. Slash-separated CRATES that can be interpreted without resorting to regular expressions.

I sure did recall complaining about #regex there before. Now generating the crate list for cryptography is 3 times as fast as the original!

https://github.com/gentoo/gentoo/pull/31456

#bash #Gentoo

fkinoshita, to GNOME

I just released Wildcard, a development utility for testing/practicing regular expressions, check it out on Flathub!

https://flathub.org/apps/io.github.fkinoshita.Wildcard

#GNOME #libadwaita #rust #regex

mjgardner, to javascript
@mjgardner@social.sdf.org avatar

The unholy trinity of #JavaScript

mjgardner, (edited )
@mjgardner@social.sdf.org avatar

@jernej__s @malwareminigun / \p{Quotation_Mark} solved \p{Quotation_Mark} /x #Perl #regex

(Note that doesn’t work with software using the #PCRE Perl “Compatible” #RegularExpression library because its #Unicode support is worse: https://www.pcre.org/current/doc/html/pcre2unicode.html#:~:text=Only%20the%20short%20names%20for%20properties%20are%20supported)

vwbusguy, to programming
@vwbusguy@mastodon.online avatar

This week I combined #regex and #emoji in some very serious #python code and it all worked on the first try. #SeniorEngineer

https://github.com/vwbusguy/cardinal-plugin-bacon/blob/main/plugin.py#L8

ovid, to random
@ovid@fosstodon.org avatar

For those who use git and are tired of remembering the difference between POSIX regular expressions and Perl regular expressions:

git config --global grep.patternType perl

#git #regex #perl #POSIX

brokenix, to random
@brokenix@emacs.ch avatar

naive question- which string manipulation plugin do you use, why and how do you install in in # emacs?
#regex
I have s.el , but I not clear of any of the 3 parts about it

slink, (edited ) to opensource
@slink@fosstodon.org avatar

regsub() on bodies has finally arrived for #opensource Varnish HTTP Cache.

Our #pcre2 #regex module https://gitlab.com/uplex/varnish/libvmod-re for #varnishcache now also supports substitutions on bodies. Similar to the recently announced .match_body() method, this feature supports matches across storage segments while avoiding to make copies using PCRE2's partial match feature.

Another big thank you to Philip Hazel and Zoltan Herczeg for their great work on the essential regular expression library.

regehr, to random
@regehr@mastodon.social avatar

students are getting a bit harsh lately

mjgardner,
@mjgardner@social.sdf.org avatar

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

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

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

#Perl #RegEx #RegExp #RegExes #RegExps

slink, to random
@slink@fosstodon.org avatar

A bugfix gives me an excuse to mention that, for some time now, vmod_re https://gitlab.com/uplex/varnish/libvmod-re - our #pcre2 #regex module for #varnishcache - also supports matches against bodies.
The implementation supports matches across storage segments while avoiding to make copies using PCRE2's partial match feature.
A big think you to Philip Hazel and Zoltan Herczeg for their great work on the essential regular expression library. @slimhazard

adamghill, to webdev

Started writing some #regex to parse #markdown into #html before I caught myself and just used https://github.com/lepture/mistune like a sane person.

  • All
  • Subscribed
  • Moderated
  • Favorites
  • JUstTest
  • mdbf
  • ngwrru68w68
  • modclub
  • magazineikmin
  • thenastyranch
  • rosin
  • khanakhh
  • InstantRegret
  • Youngstown
  • slotface
  • Durango
  • kavyap
  • DreamBathrooms
  • provamag3
  • GTA5RPClips
  • tacticalgear
  • normalnudes
  • tester
  • osvaldo12
  • everett
  • cubers
  • ethstaker
  • Leos
  • anitta
  • cisconetworking
  • megavids
  • lostlight
  • All magazines