Using the built in PHP regex function preg_replace and property encoding the two strings you’re searching for with preg_quote you can remove all of the
Replace All Characters In a String that Aren’t Alphanumeric
Using the preg_replace function you can easily replace all characters in a string that are not alphanumeric. This can be useful for sanitizing a string
Function to Remove Dollar Signs and Commas From a Number
I needed a function to turn a string value dollar with commas into a decimal I could insert into MySQL. This function below will take
Linux Command Line Example To Remove Emails From a Text File
sed is a really powerful Linux command line utility. It can in a one line do what would take sometimes 20-30 lines of code in
Function to Parse URLs From a PDF Document
You don’t have to actually programmatically read a PDF to parse out the links in them. This simple routine below will parse out all the
A Flexible Text Parser Without Regular Expressions
Regular expressions are great but sometimes you want to do it faster (meaning easier), depending on what you’re trying to do. When you quickly want