Blog

Page 613 of my articles, tutorials, and thoughts

Latest Articles

Cover Image for Rails: Default sort order for a rails model?
ruby-on-rails

Rails: Default sort order for a rails model?

Published on September 2, 2023

# 🚂 Rails: Default Sort Order for a Rails Model? Are you tired of manually specifying the sort order every time you query a Rails model? Wouldn't it be great if you could set a default sort order that is applied automatically, but still have the flexibil

Cover Image for Android: Go back to previous activity
android

Android: Go back to previous activity

Published on September 2, 2023

# Android: Going Back to Previous Activity 🔄💡 Are you feeling lost in your Android app and want to go back to a previous activity? Don't worry, we've got you covered! In this blog post, we will address common issues related to navigating back to a previ

Cover Image for Regex how to match an optional character
operatorsregexstring

Regex how to match an optional character

Published on September 2, 2023

# Regex: How to Match an Optional Character So you thought your regex was working correctly until now, huh? 😕 Don't worry, we've all been there! Matching an optional character in a regex can be a bit tricky, but fear not. In this blog post, we'll tackle

Cover Image for Regular Expressions and negating a whole character group
regex

Regular Expressions and negating a whole character group

Published on September 2, 2023

# The Power of Regular Expressions: Negating a Whole Character Group 😮 So you want to match a string that *does not* contain a specific sequence of characters? 🤔 Don't worry, you're not alone! This can be a bit confusing, but fear not! We're here to exp

Cover Image for Regular expression to allow spaces between words
regex

Regular expression to allow spaces between words

Published on September 2, 2023

🔍 Regex Struggles: Allowing Spaces Between Words 🔍 Are you tired of struggling with regular expressions that just don't give you the flexibility you need? 🤔 Don't worry, I've got your back! In this blog post, I'll show you a simple solution to allow sp

Cover Image for Concrete JavaScript regular expression for accented characters (diacritics)
javascriptregexunicode

Concrete JavaScript regular expression for accented characters (diacritics)

Published on September 2, 2023

# How to Match Accented Characters (Diacritics) in JavaScript: A Comprehensive Guide Are you struggling with matching accented characters (those with diacritical marks) in JavaScript? 🤔 Worry no more! In this guide, we'll discuss common issues and provi

Cover Image for How to make Regular expression into non-greedy?
filterjavascriptregex

How to make Regular expression into non-greedy?

Published on September 2, 2023

🔍 How to Make Regular Expression into Non-Greedy 🔍 Are you tired of getting unexpected results when using regular expressions? Do you want to learn how to make your regular expression non-greedy? Look no further! In this article, we'll walk you through

Cover Image for Java: splitting a comma-separated string but ignoring commas in quotes
javaregexstring

Java: splitting a comma-separated string but ignoring commas in quotes

Published on September 2, 2023

# Splitting a Comma-Separated String in Java: Ignoring Commas in Quotes Just when you thought manipulating strings couldn't get any trickier, you come across a situation where you need to split a comma-separated string, but you want to ignore commas that

Cover Image for Match two strings in one line with grep
regexstring

Match two strings in one line with grep

Published on September 2, 2023

# 📝 Easy Solution for Matching Two Strings in One Line with Grep! Have you ever struggled with using `grep` to match lines that contain *two different strings*? 🤔 It can be quite frustrating when the usual technique of `grep 'string1\|string2' filename`

Blog | Matheus Mello