mathstodon.xyz is one of the many independent Mastodon servers you can use to participate in the fediverse.
A Mastodon instance for maths people. We have LaTeX rendering in the web interface!

Server stats:

2.8K
active users

#grep

2 posts2 participants0 posts today

You know how you can understand something like Regular Expressions (Grep) well enough to write really complex statements that precisely match the nuanced text patterns you’re hoping to revise, but then 6 months later you look at this RegEx you wrote and can’t parse it at all? Like, literally no idea how it works? As in it-would-be-faster-to-recreate-it-from-scratch-than-to-understand-it-enough-to-change-it-even-slightly?

I feel like that all the time.

[FR]
Arrivée ici début 2025, big up aux @admin de Piaille.fr ! #introduction :
Tombée dans la marmite #OpenSource en 2000, je me nourris de commandes #bash. Fichiers texte, #grep et ses jolies #regex, #ansible, #git, #greasemonkey, les tests auto et la supervision sont tes amis.
Cordes frottées, grattées et frappées, sons soufflés, chantés ou beatboxés, sons électro ou scratchés me touchent. Rien de tel qu'une bonne soirée à jammer / à enregistrer pour un beatmaker / à débarquer sur scène pour accompagner quand il manque un instrumentiste / à repiquer des morceaux entiers sur papier à l'ancienne / à improviser avec les enfants
Engagée #AMAP et pro #CNV

Anybody else download like 1000 TikToks and max out their phones storage and their back up solution? No...yeah...Me Neither.

But if someone did, here's a way to solve it quickly on Android devices.

Since #TikTok names all its video files 32bithexadecimalvalue.mp4, we can us a little #grep and #regex along with #Termux to sort through the #Android #camera roll and delete all the corresponding files.

justinmcafee.com/posts/2025/so

justinmcafee.comJustin McAfee - So You Downloaded a Thousand TikToks

I've mirrored a relatively simple website (redsails.org; it's mostly text, some images) for posterity via #wget. However, I also wanted to grab snapshots of any outlinks (of which there are many, as citations/references). By default, I couldn't figure out a configuration where wget would do that out of the box, without endlessly, recursively spidering the whole internet. I ended up making a kind-of poor man's #ArchiveBox instead:

for i in $(cat others.txt) ; do dirname=$(echo "$i" | sha256sum | cut -d' ' -f 1) ; mkdir -p $dirname ; wget --span-hosts --page-requisites --convert-links --backup-converted --adjust-extension --tries=5 --warc-file="$dirname/$dirname" --execute robots=off --wait 1 --waitretry 5 --timeout 60 -o "$dirname/wget-$dirname.log" --directory-prefix="$dirname/" $i ; done

Basically, there's a list of bookmarks^W URLs in others.txt that I grabbed from the initial mirror of the website with some #grep foo. I want to do as good of a mirror/snapshot of each specific URL as I can, without spidering/mirroring endlessly all over. So, I hash the URL, and kick off a specific wget job for it that will span hosts, but only for the purposes of making the specific URL as usable locally/offline as possible. I know from experience that this isn't perfect. But... it'll be good enough for my purposes. I'm also stashing a WARC file. Probably a bit overkill, but I figure it might be nice to have.

Die #InDesigns #GREP-Engine kann im #Lookbehind nur eine fest definierte Anzahl von Zeichen prüfen – nicht eine beliebige Länge.

Wenn man beispielsweise schließende Klammern nur dann finden möchte, wenn davor ein beliebig langer Text steht, geht das nicht.

(?<=\d{3}) (3 Ziffern) funktioniert.
(?<=\d+) (eine oder mehrere Ziffern) funktioniert nicht.

Selbst wenn man Alternativen mit | kombiniert, müssen alle Optionen die gleiche Zeichenzahl aufweisen.

#Lookahead lässt variable Längen zu.

[Archive — 2023] Comment j'ai (presque) foutu en l'air une demi-journée de boulot

Si vous avez viré par erreur un fichier texte, un simple grep peut vous sauver la vie. Une histoire qui commence très mal mais finit très bien grâce à GNU/Linux !

▶️ Lire cet article : studios.ptilouk.net/superflu-r
📗 Le livre best of : editions.ptilouk.net/gb10ans
❤️ Soutien : ptilouk.net/#soutien

#archive #technique #grep #dev #récupération #GNUlinux

studios.ptilouk.net/superflu-r

Superflu Riteurnz BlogComment j'ai (presque) foutu en l'air une demi-journée de boulot
More from Ptilouk.net Studios
Continued thread

... Oh that reminds me: avoid #grep too due to terrible speed issue: bugs.freebsd.org/bugzilla/show ; bugs.freebsd.org/bugzilla/show .

Am partial to "#ugrep(1)" github.com/Genivia/ugrep (port: freshports.org/textproc/ugrep/ ).

(Sure, GNU grep, "ggrep(1)", is better too🤷‍♂️ if want to use same/similar enough options as native grep. So is a search via "perl(1)": perl -n -e 'm{regex} and print'.)

One day regex library (of #FreeBSD) [cw]ould be better. One could also die while holding breath for that day to arrive.

2/2

bugs.freebsd.org254763 – grep very slow with 13.0-RC4