social.tchncs.de is one of the many independent Mastodon servers you can use to participate in the fediverse.
A friendly server from Germany – which tends to attract techy people, but welcomes everybody. This is one of the oldest Mastodon instances.

Administered by:

Server stats:

3.8K
active users

#regex

4 posts4 participants0 posts today

Im trying to provide aliases for #regex definitions so that humans would be able to understand things better scanning my coding.

However, an identifier as terse as `/[^\s\t_-\/\.=<>:]+/` becomes hideously long to describe in english descriptors.

Is there a midpoint reference or shorthand that could serve as a compromise?

I may just provide a vague numbered reference as a hack - but this obviously is ineligent and a recipe for bugs (should I label something else with the same nomenclature)

Mal eine Frage zu #Regex.

Eins hat ja immer mehrere Optionen, wie Regexen geschrieben werden können.

Wenn ich jetzt bspw. folgendes matchen will:

2025-04-03 09:45:52,731 INFO

Mach ich dann eher A oder B?

A: ^[0-9]{4}-[0-9]{2}-[0-9]{2}\s+[0-9]{2}:[0-9]{2}:[0-9]{2},[0-9]{3}\s{1}(?P<level>[A-Z]*)

B: [0-9-:,\s]*(?P<level>[A-Z]*)

Welche Variante ist denn schneller?
Was ist hier besser?

:BoostOK: :ReplyOK:

#PokemonGO does not have a good way to monitor friends' inactivity. Given that I keep hitting the friend limit I am trying to figure out a way to document. Try number current, I have a #python script running that reads a screen recording of scrolling through my friend list and runs ocr and #regEx to give me a snapshot of some stats. If I do this again in a week or three, anyone who hasn't changed has been identified as inactive. [This would be a better blog post than micro-blogging thread]

Hey, does anyone have recent experience with trying to get an LLM to make regexes for you? Does it work? I hate doing them but I suspect that's an area where I'd still need to be an expert to see that it isn't working.
#regex #LLM

My PhD student was still feeling uncomfortable with #regex, so I searched and found these awesome regex games that can help you improve your regex-fu and help you have some fun during your daily commute:

regexcrossword.com

the-regex-game.com/?level=inte

and this imho is more geared towards beginners:

regexone.com

Regex CrosswordRegex CrosswordA crossword puzzle game using regular expressions. Earn achievements completing puzzle challenges. Easy tutorials for people new to regular expressions.

Pyparsing 3.2.2 cleans up a formerly internal-only utility method make_compressed_re(), and makes it part of the public API. Given a list of strings, it generates a regex to match those strings and only those (so no cheating like ".*").

Here are before/after expressions for matching chemical symbols.

Replied in thread

@bortzmeyer Zig is one of three languages I have my eye on!

- #Zig - Procedural and easier to read than C.
- #Haskell - Functional in the extreme.
- #Rakulang - Can be functional, can be procedural, can be OO. Fantastic grammar / #regex model.

I think they complement each other. Every Haskell guy I have introduced to Raku has loved it. I've known a few people who use Zig when they don't feel like being purely functional.