Blog

Page 548 of my articles, tutorials, and thoughts

Latest Articles

Cover Image for Extract part of a regex match
htmlpythonregex

Extract part of a regex match

Published on September 2, 2023

# Extract Part of a Regex Match: A Simple Guide 🧩 Are you tired of manually removing HTML tags after extracting content from a webpage using regular expressions? We've got you covered! In this blog post, we'll show you how to extract just the contents of

Cover Image for Regular expression to match standard 10 digit phone number
regex

Regular expression to match standard 10 digit phone number

Published on September 2, 2023

# Easy-peasy Phone Number Regular Expression šŸ“ž Alright, folks! šŸŽ‰ Today, we're diving into the exciting world of regular expressions and tackling a common problem: matching standard 10-digit phone numbers. šŸ’Ŗ Whether you're a tech geek or just a curious

Cover Image for Using regular expressions to parse HTML: why not?
regex

Using regular expressions to parse HTML: why not?

Published on September 2, 2023

# Using Regular Expressions to Parse HTML: 🧩 Why Not? šŸ¤” Have you ever wondered why people discourage using regular expressions to parse HTML? 🌐 Let's dive into this topic and explore both the common issues surrounding regex usage and the easy solutions

Cover Image for How do I explicitly specify a Model"s table-name mapping in Rails?
ruby-on-rails

How do I explicitly specify a Model"s table-name mapping in Rails?

Published on September 2, 2023

# How to šŸ’ā€ā™‚ļø explicitly specify a Model's table-name mapping in Rails? So you have this cool Model called `Countries` and you want it to be represented by a fancy DB table called `'cc'` in your Rails app? šŸ¤” Don't worry, I got you covered! šŸ˜Ž By defaul

Cover Image for How can I match a string with a regex in Bash?
regexstring

How can I match a string with a regex in Bash?

Published on September 2, 2023

šŸ” How to Match a String with a Regex in Bash šŸš€ Are you struggling to make your if elif then statements work when trying to match a string with a regex in Bash? Don't worry, I've got you covered! In this guide, I will walk you through the common issues a

Cover Image for Regular expression for exact match of a string
regex

Regular expression for exact match of a string

Published on September 2, 2023

# A Beginner's Guide to Using Regular Expressions for Exact String Matching šŸ‘„šŸ” šŸ’Æ Are you struggling to match two passwords with a regular expression? Don't worry, you're not alone! Regular expressions can be a bit intimidating at first, but once you und

Cover Image for How to escape regular expression special characters using javascript?
javascriptregex

How to escape regular expression special characters using javascript?

Published on September 2, 2023

# How to Escape Regular Expression Special Characters Using JavaScript: A Complete Guide Hey there šŸ‘‹! Are you having trouble escaping regular expression special characters in JavaScript? Don't worry, you're not alone! In this blog post, we'll walk throug

Cover Image for RegEx to extract all matches from string using RegExp.exec
javascriptregex

RegEx to extract all matches from string using RegExp.exec

Published on September 2, 2023

## Extracting All Matches from a String using RegExp.exec šŸ” So you want to extract all matches from a string using the `RegExp.exec` method? Well, you've come to the right place! šŸŽ‰ In this blog post, we'll explain how to solve the common issue of only g

Cover Image for RegEx for matching UK Postcodes
regexvalidation

RegEx for matching UK Postcodes

Published on September 2, 2023

šŸ“ó §ó ¢ó „ó ®ó §ó æšŸ”¤šŸ“ƒā˜‘ļøšŸ” Hey there! Are you struggling to validate UK postcodes? šŸ“ó §ó ¢ó „ó ®ó §ó æ Don't worry, I've got your back! In this post, I'll guide you through an easy solution using regular expressions (Regex) to match UK postcodes. Let's get started!

Cover Image for regex to match a single character that is anything but a space
regex

regex to match a single character that is anything but a space

Published on September 2, 2023

šŸŽ‰šŸ” How to Write a Regex to Match a Single Character Except for a Space šŸ”šŸŽ‰ Are you feeling frustrated because you need to match a single character, but you're clueless about how to exclude spaces using regular expressions (regex)? Don't worry, amigo, I