Blog

Page 566 of my articles, tutorials, and thoughts

Latest Articles

Cover Image for How do I get the YouTube video ID from a URL?
javascriptregexurl

How do I get the YouTube video ID from a URL?

Published on September 2, 2023

# How to Get the YouTube Video ID from a URL πŸ“Ή Are you looking to extract the YouTube video ID from a URL using JavaScript? Look no further! In this easy-to-follow guide, we'll walk you through the process step-by-step, addressing common issues and provi

Cover Image for How to make an Android device vibrate? with different frequency?
androidjava

How to make an Android device vibrate? with different frequency?

Published on September 2, 2023

πŸ“±πŸ’₯ How to Make Your Android Device Vibrate? Feel the Pulse! πŸ’₯πŸ“± Are you ready to add some πŸ’₯vibrationsπŸ’₯ to your Android app? It's time to make your users feel every tap and alert on their device! In this guide, we'll show you step-by-step how to make

Cover Image for Split a string by spaces -- preserving quoted substrings -- in Python
pythonregex

Split a string by spaces -- preserving quoted substrings -- in Python

Published on September 2, 2023

# Split a string by spaces, preserving quoted substrings in Python So you have a string and you want to split it by spaces in Python, but you also need to preserve any substrings that are enclosed in quotes. πŸ€” Let's break down this problem and find an e

Cover Image for In Python, how do I split a string and keep the separators?
pythonregex

In Python, how do I split a string and keep the separators?

Published on September 2, 2023

# How to Split a String and Keep the Separators in Python 🧲 Have you ever encountered a situation where you needed to split a string in Python, but also wanted to retain the separators? This can be particularly useful when you want to tokenize a string,

Cover Image for How to use JavaScript regex over multiple lines?
javascriptregex

How to use JavaScript regex over multiple lines?

Published on September 2, 2023

# How to Use JavaScript Regex Over Multiple Lines? πŸ’»πŸ” Are you struggling to use JavaScript regex over multiple lines? πŸ€” Don't worry, you're not alone! Many developers face this issue when trying to match patterns that span across newline characters. πŸ“

Cover Image for Escaping regex string
pythonregex

Escaping regex string

Published on September 2, 2023

# Escaping Regex String: A Handy Guide to Tame the Wild Symbols 🦁 Are you tired of tussling with regex patterns that seem to have a mind of their own? Do you find it challenging to handle user input when it contains characters that have special meaning i

Cover Image for How to replace captured groups only?
javascriptregex

How to replace captured groups only?

Published on September 2, 2023

# How to Replace Captured Groups Only: A Guide for Regex Newbies πŸŽ‰ *TL;DR: Looking to replace a specific part of a string using captured groups in regex? We've got you covered! Follow our step-by-step guide below to easily replace captured groups and giv

Cover Image for Remove new lines from string and replace with one empty space
regexstring

Remove new lines from string and replace with one empty space

Published on September 2, 2023

# Removing new lines from a string and replacing them with one empty space Are you struggling with removing new lines from a string and replacing them with a single empty space? Don't worry, you're not alone! Many developers encounter this issue when deal

Cover Image for RegEx: Grabbing values between quotation marks
regex

RegEx: Grabbing values between quotation marks

Published on September 2, 2023

# Title: Unleash the Power of Regex to Grab Values between Quotation Marks! 😎 Hey there tech enthusiasts! Got a burning question about using Regex to snatch values between quotation marks? Look no further! We've got your back with this handy guide that w

Cover Image for Check if a string matches a regex in Bash script
regexshell

Check if a string matches a regex in Bash script

Published on September 2, 2023

## How to Check if a String Matches a Regex in Bash Script πŸ’»πŸ” So, you have a date input in the `yyyymmdd` format, and you want to make sure it's a valid date. The good news is that you can use regular expressions (regex) in your Bash script to accomplis