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.
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.
@tripleo You’re thinking of #Perl’s “taint mode” (stop your teenage giggling), where outside data is untrusted unless it’s the extracted subpattern match in a #RegularExpression.
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.
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.
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.
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.
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.