leobm, to RegEx German
@leobm@norden.social avatar

The ?x modifier/flag is nice, never used it before.
Makes it possible to include commentary inside complicated patterns.

original source: https://polar.sh/eval/posts/named-capturing-groups-in-clojure

sue, to random
@sue@glasgow.social avatar

I'd like back all the hours I've spent over the years trying figure out the correct incantations of quotation marks and escape characters to get computers to do what I want with some text.

nicholas_saunders,

@sue @kellogh how is with ?

On a dollar basis it's attractive. On an ecological death of the world basis, not so much.

evilchili, to Canada
@evilchili@linernotes.club avatar

Hey Canadian nerds! I have held the domain registration for regex.ca for a very long time. When I lived in Canada it was my primary domain, but I haven't used it for years. Does anyone on the fediverse have a good use for it?

I'm going to release it but if you've got a good pitch I'll pay for a 1 year renewal and then transfer it to your ownership.

Please boost for visibility kthx!

claudius,
@claudius@darmstadt.social avatar
chrastecky, to RegEx
@chrastecky@phpc.social avatar

Lo and behold, fellow mortals of the programmer variety! I find myself embarking upon a most arduous quest.

One that shall test the mettle of my coding prowess... Yes, thee heard right.

I dare to dance with the elusive and powerful entity known as... the #regex #email #validation!

tripleo, to random
@tripleo@fosstodon.org avatar

All you nutcases still using , what's actually wrong with it?

aka What are the sharp edges?

mjgardner,
@mjgardner@social.sdf.org avatar

@tripleo You’re thinking of ’s “taint mode” (stop your teenage giggling), where outside data is untrusted unless it’s the extracted subpattern match in a .

It’s only enabled under certain conditions. Read about it in the perlsec manual page: https://perldoc.perl.org/perlsec#Taint-mode

stevensanderson, to programming
@stevensanderson@mstdn.social avatar

If you work with text data in R, the gregexpr() function is essential for pattern matching. It finds all occurrences of a pattern within a string. Key parameters include pattern, text, ignore.case, perl, fixed, and useBytes. You can match characters, ignore case, use advanced regex, and search fixed strings.

#R

Post: https://www.spsanderson.com/steveondata/posts/2024-05-17/

image/png
image/png

stevensanderson, to programming
@stevensanderson@mstdn.social avatar

🎉 New Post Alert! 🎉

Counting words in a string is a fundamental task in data analysis.

  1. Base R: Use strsplit(), a straightforward method to split strings and count words.

  2. stringr: The str_split() function from the stringr package makes the code more readable.

  3. stringi: For powerful and efficient string manipulation, stri_split_regex() from the stringi package is your go-to.

Happy coding! 🚀

#R #RStats #RProgramming #Programming #regex #Coding #strings

Post: https://www.spsanderson.com/steveondata/posts/2024-05-16/

stevensanderson, to programming
@stevensanderson@mstdn.social avatar

🔎 Selecting Columns Containing a Specific String in R: A Quick Guide 🚀

Hey R users! Need to select columns by a specific string? Here's how in base R, stringr, stringi, dplyr, and with a bonus from data.table.

🆒 R
✅ grepl
📦 stringr
📦 stringi
📦 dplyr

Bonus: 📦 data.table
library(data.table)
df_price <- df[, names(df) %like% "price"]

Happy coding! 🚀

Post: https://www.spsanderson.com/steveondata/posts/2024-05-15/

#R

image/png
image/png
image/png

lizardbill, to RegEx
@lizardbill@hachyderm.io avatar

You can't parse [X]HTML with regex. #regex #html https://stackoverflow.com/a/1732454/1288

stevensanderson, to programming
@stevensanderson@mstdn.social avatar

🔍 Quick Guide: Detecting Strings in R

In my latest blog post, I cover how to find specific strings in data columns using the str_detect function from the stringr package and base R functions. You'll see practical examples with both grepl for identifying matches and gregexpr for counting occurrences.

Read more here: https://www.spsanderson.com/steveondata/posts/2024-05-10/ and explore ways to make string detection a breeze in your data work!

#RStats #DataCleaning #R #RProgramming #Programming #Data #Regex

image/png

donwatkins, to RegEx
@donwatkins@fosstodon.org avatar

Regular Expressions #2: An example – Both.org https://www.both.org/?p=5154 #regex #Linux

stevensanderson, to stackoverflow
@stevensanderson@mstdn.social avatar

I was working on a problem today where I needed to pick out a department and a sub issue that were attached to each other as a single code in a comment.

I first went to use the traditional SUSTRING(comment_string, 1, 5) IN (my list of codes) but it was slow.

So off to work, I learned something new via #stackoverflow and learned to make a sarge-able LIKE with what ever I want in the narrower results.

Nice to learn something new.

#SQL #MSSQL #RegularExpressions #regex

villetakanen, to RegEx
@villetakanen@mementomori.social avatar
profoundlynerdy, to raku
@profoundlynerdy@bitbang.social avatar

What are some underappreciated superpowers that and/or has EXCLUDING and ?

NireBryce, to RegEx
@NireBryce@hachyderm.io avatar

does there yet exist any application that can take a multi-selection and spit out a #regex that will match that in any file going forward?

stevensanderson, to RegEx
@stevensanderson@mstdn.social avatar

I decided to make a blog post out of a problem I worked on a day or two ago and thankfully I was also pointed to another solution from @embiggenData which worked well too.

#R #RStats #RProgramming #Data #regex #tidyverse #glue #unglue #tidyr #dplyr

Post: https://www.spsanderson.com/steveondata/posts/2024-04-12/

image/png
image/png

necrosis, to RegEx German
@necrosis@chaos.social avatar

Liebe Informatik Lehrkräfte, bitte bringt euren Schülerinnen und Schülern #RegEx bei.

Es hilft im Job ungemein. 😅
Ich wünschte ich hätte das schon in der Schule gelernt. 🥹

#FediLZ

proactiveservices, to RegEx
@proactiveservices@fosstodon.org avatar
alter_unicorn, to RegEx
@alter_unicorn@masto.bike avatar
stevensanderson, to programming
@stevensanderson@mstdn.social avatar
stux, to RegEx
@stux@mstdn.social avatar

How to #REGEX

rdela, to RegEx
@rdela@mastodon.social avatar

Chat log from this morning’s #StaticChronicles with @zachleat + @mikeneu from @cloudcannon, in which I clumsily praise @paulcuth, @robb, and @bobmonsour among others!
https://gist.github.com/rdela/e8facf1a8a31ea5223c42075cbaa9bb2

Follow on Twitch
https://www.twitch.tv/cloudcannoncms

Subscribe on YouTube
https://www.youtube.com/@cloudcannon

Today's ep. https://youtu.be/Pt5CWtEPmBM

Bonus #RegEx I use to clean up the copy pasted Discord chat…

(?# Space out copy-pasted discord chat)  
(?# find )  
^(.+)\n:\s?  
(?# replace )  
\n$1:\n  
danyeaw, (edited ) to python
@danyeaw@fosstodon.org avatar

I'm excited about giving a talk about Matching Text with Regular Expression at Michigan Python tomorrow at 7pm EST at Washtenaw Community College in Ann Arbor and online. All are welcome! https://www.meetup.com/michigan-python/events/299577684/ #python #regex

Mehrad, to RegEx
@Mehrad@fosstodon.org avatar

I really do enjoy #regex. It always cheers me up. Kinda feel like a cool puzzle.

I learnt regex when I was learning Perl back in the day. But big shout-out to https://www.regular-expressions.info/ and https://regexr.com/ for providing such good resources for me to help my friends and colleagues also learn regex and enjoy writing it.

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