Danny S · @dmanls
15 followers · 203 posts · Server social.vivaldi.net

Anyone know ? How do I do a simple match of two words, like this AND that?

#regex

Last updated 1 year ago

Leon Cowle · @leoncowle
185 followers · 2077 posts · Server hachyderm.io

Reason number 327 you know you love your job:

Volunteering (insisting) to code an emergency workaround fix for your prod ecom website at 11pm on a Friday night, whilst on vacation with your laptop tethered to your phone.

And having a LOT of fun doing so (, VCL, Fastly Fiddle, ftw)!

#regex #fastly

Last updated 1 year ago

Thu Htoo San :fedora: · @thuhtoosan
10 followers · 170 posts · Server floss.social

က တကယ်ကိုခေါင်းစားချက်ပဲ 🙃
global flag နဲ့ logical OR ပေါင်းသုံးပြီး လုပ်တဲ့အကွက်တွေကို မပိုင်သေးဘူး။

#regex

Last updated 1 year ago

نادیار | Naadiyaar · @Naadiyaar
24 followers · 335 posts · Server fosstodon.org

very neat interactive website for learning

regexlearn.com

#regex

Last updated 1 year ago

`Da Elf · @elfin
184 followers · 4842 posts · Server mstdn.social

I'd like much better in my apps rather than syncing it to my server and using Thunderbird (meh) or Perl / from to find something important from a non-regular sender six months ago that is suddenly necessary again.

#Bash #regex #imap #sms #functions #search

Last updated 1 year ago

🇺🇦🇪🇺 cweickhmann · @cweickhmann
188 followers · 5199 posts · Server qoto.org

Rule of thumb: When working with on a CSV file - and I mean actual CSV, not some ascii gibberish- and someone suggest using a , it's almost always a bad, nay, very bad idea. 🤭

#pandas #regex

Last updated 1 year ago

barefootstache · @barefootstache
114 followers · 1034 posts · Server qoto.org

(36/50)

that parsing via sed and pattern matching two different syntax variants are in use. The former requires a lot of escape character where as the latter doesn’t.

Take for example

\([0-9]\{2\}\-\)\+\([0-9]\{2\}\)

which is the correct syntax when using sed, where as it won’t work with pattern matching over =~. In such a case it would be

([0-9]{2}-)+([0-9]{2})

This cost me so much debugging fun.

#DailyBloggingChallenge #regex #bash #til

Last updated 1 year ago

keinxperte · @keinxperte
2 followers · 52 posts · Server norden.social

@wutti
Oha, da kann ich nicht ganz mithalten.
Mein blockt aktuell 4,63 Mio.
plus 30 Regex-Filter.

#pizero #pihole #regex #blockliste #axelspringer

Last updated 1 year ago

Backendzeit · @backendzeit
86 followers · 1208 posts · Server norden.social
Lemni · @Lemni
18 followers · 29 posts · Server framapiaf.org
Akshar Varma · @aksharvarma
64 followers · 562 posts · Server mathstodon.xyz

A couple of other things you can combine together with the ideas above:

1. Narrowing the buffer to only the portion of interest (or element, subtree, etc.). This is so good. It clears space and visual clutter, it ensures unwanted things don't get changed out of your view. I have also used it when presenting something in class; I didn't want the whole buffer to use up space, so I narrowed to the relevant part, allowing me to direct attention, increase font size and other nice things.

2. Swapping the keybindings for isearch with and without regex. So my default search uses regexp. For most cases, you may not even notice the difference since you would be using alphanumeric characters in your search term. The only time it genuinely affects me is when I search for a `.` in the text and I have to escape it so that it searches for a literal `.` and not a wildcard match. But that is a small enough case that I can ignore that.

#regex #emacs

Last updated 1 year ago

Akshar Varma · @aksharvarma
64 followers · 562 posts · Server mathstodon.xyz

Another editing discovery. Every time my thought process goes along the lines of: "I can also do this!?!!"

Today's cast: , isearch, wgrep, and optionally keyboard macros, iedit and wdired.

(h/t This thread: emacs.ch/@ramin_hal9001/110933.
@ramin_hal9001 and @cwebber were mentioning many cools emacs tips and I learnt that I can *edit* what comes out of occur!)

TIL that you can switch from isearch to occur mid search! So you can do something like:
1. Start incremental (regexp) search in an editable buffer.
2. Once satisfied with the regex/search term, Do `M-s o` to have all matching lines end up in an occur buffer.
3. Press `e` to enable wgrep giving you an editable buffer with only matching lines.
4. Do whatever editing you like: iedit, regex replace, keyboard macros, whatever.
5. `C-c C-c` when done and the changes get reflected in *original buffer*.

Triggering occur after incremental search gets you the best of both worlds: the visual feedback on the regexp search helping to interactively adjust it. You jump to occur only when you're satisfied with the matches. It will be as if you had magically typed out that complex regexp free-hand.

#regex #occur #emacs

Last updated 1 year ago

I could agree with you, but then we'd both be wrong. 🤣

fosstodon.org/@dHeinemann/1109

Just kidding, thanks for responding, everyone! I had no idea "reg-ex" was so common.

#regex #regularexpressions #programming

Last updated 1 year ago

Luke T. Shumaker · @lukeshu
33 followers · 292 posts · Server fosstodon.org

I'm generally of the stance that isn't nearly as bad as people say, to read or to write; especially if using something like 's re.VERBOSE. But holy cow is it easy to accidentally write an expression that does surprising things with look-behind/look-ahead. re2 and not supporting those is a good call, IMO.

#regex #python #golang

Last updated 1 year ago

takeonrules · @takeonrules
210 followers · 231 posts · Server dice.camp

Explaining new functionality added to my random-table.el package. This explanation includes the Emacs Lisp code and some explanation. Ultimately, building these random tables grows my personal GM notebook; encoding logic and making it readily and consistently available (when I have my computer).

takeonrules.com/2023/08/20/add

#regex #ttrpg #rpg #osr #emacs

Last updated 1 year ago

Developers: how do you personally pronounce "regex"?

* Rej-ex ("Rej" as in "register")?
* Reg-ex ("Reg" as in "regular")?
* Something different? - share in the comments!

#regex #regularexpressions #programming

Last updated 1 year ago

postmodern · @postmodern
1323 followers · 1969 posts · Server ruby.social

Protip: if you want to validate international text, never use [A-Za-z] in your regexs. Use \p{L} (unicode letter), \p{Lu} (uppercase unicode), \p{Ll} (lowercase unicode).
ruby-doc.org/3.2.2/Regexp.html

#ruby #regex

Last updated 1 year ago

David Miller · @dvmiller
3 followers · 56 posts · Server mstdn.social

I feel like I need a badge for this. While writing an ugly pile of to deal with one problem, I accidentally implemented a feature that hadn’t even been through design, much less scheduled in a sprint. Know barely more than 2 days ago (a *lot* more about gsub()’s matching quirks, though), but it ships to production Monday.

#Ruby #regex

Last updated 1 year ago

Viviana · @viviana
107 followers · 765 posts · Server fimidi.com

Ich habe gestern hier ein Comic gesehen, wie man "richtig" macht (eine Katze über die Tastatur laufen lassen), aber ich habe es anscheinend doch nicht gesternt und jetzt finde ich es nicht mehr ... hat es sonst jemand gesehen?

#regex #followerpower

Last updated 1 year ago