How-to articles, tricks, and solutions about REGEX
Remove HTML tags from a String
To remove HTML tags from a string, you can use a regular expression to match and replace the tags with an empty string.
Remove new lines from string and replace with one empty space
To remove new lines from a string and replace them with a single empty space in PHP, you can use the str_replace function.
Split Java String by New Line
To split a string in Java by new line, you can use the split method of the String class and pass it the regular expression "\n" or "\r\n", depending on the platform you are running on.
Split string on whitespace in Python
You can use the split() method to split a string on whitespace in Python.