Blog

Page 634 of my articles, tutorials, and thoughts

Latest Articles

Cover Image for How to extract a substring using regex
javaregexstring

How to extract a substring using regex

Published on September 2, 2023

# Extracting a Substring with Regex: Unleashing the Power of Regex Magic āœØāœ‚ļø So, you have a string that contains a valuable piece of information trapped between two single quotes, and you're wondering how to use regex to extract it. Well, fear not! We're

Cover Image for Regex match one of two words
regexvalidation

Regex match one of two words

Published on September 2, 2023

# **šŸŽšŸŒ Regex Magic: Matching Either "Apple" or "Banana" šŸ§™ā€ā™€ļø** Welcome, tech enthusiasts! Today, we are going to unravel the enchanting world of regular expressions, taking on the challenge of matching either "apple" or "banana" from a given input. 🧐

Cover Image for How to replace plain URLs with links?
javascriptregex

How to replace plain URLs with links?

Published on September 2, 2023

# How to Replace Plain URLs with Links Are you tired of plain, boring URLs cluttering up your text? Do you want to make your content look more professional and visually appealing? Well, you're in luck! In this blog post, we'll show you an easy solution to

Cover Image for How can I find all matches to a regular expression in Python?
pythonregex

How can I find all matches to a regular expression in Python?

Published on September 2, 2023

šŸ” How to Find All Matches to a Regular Expression in Python šŸ” Are you tired of Python leaving you high and dry after finding just one match using the `re.search()` function? Do you need a way to find ALL the matches in a block of text and keep going unt

Cover Image for Regular expression search replace in Sublime Text 2
regexreplace

Regular expression search replace in Sublime Text 2

Published on September 2, 2023

# Regular Expression Search Replace in Sublime Text 2 šŸ–ŠļøšŸ’» Are you struggling with regular expression search and replace in Sublime Text 2? You're not alone! Many users find the documentation on this feature to be rather "anemic." But fear not! šŸ™…ā€ā™‚ļø In

Cover Image for How to extract numbers from a string in Python?
numberspythonstring

How to extract numbers from a string in Python?

Published on September 2, 2023

# How to extract numbers from a string in Python? šŸ“ŠšŸ”¢šŸ’» Have you ever encountered a situation where you needed to extract all the numbers contained within a string in Python? šŸ¤” Whether you're dealing with user input, parsing text files, or just trying t

Cover Image for How to input a regex in string.replace?
pythonregexreplacestring

How to input a regex in string.replace?

Published on September 2, 2023

# How to Input a Regex in string.replace? Hey there tech enthusiasts! šŸ‘‹ Are you struggling with declaring a regex while using `string.replace`? Don't worry, you're not alone! šŸ˜… In this blog post, we'll address this common issue and provide you with easy

Cover Image for Non greedy (reluctant) regex matching in sed?
regex

Non greedy (reluctant) regex matching in sed?

Published on September 2, 2023

šŸ“ **Title: Non-greedy (Reluctant) Regex Matching in sed: How to Extract Domains from URLs** 🌐 šŸ‘‹ Hey there tech enthusiasts! Today, we're diving into the sed command and how to use it to extract domain names from URLs. If you've ever struggled with non-

Cover Image for How do I type hint a method with the type of the enclosing class?
pythonpython-3.x

How do I type hint a method with the type of the enclosing class?

Published on September 2, 2023

# How to Type Hint a Method with the Type of the Enclosing Class šŸ’” Have you ever encountered an issue where your editor tells you that a reference in your code cannot be resolved? Specifically, have you faced this problem when trying to type hint a metho

Blog | Matheus Mello