Category: regex
Many situations we want to be able to detect if a post/comment is spam by checking to see if it contains a list of spam/forbidden words. The following provides …
Validate if a given string can be interpreted as a decimal number. Some examples: “0” => true ” 0.1 ” => true “abc” => false “1 a” => false …
BASH script programming is powerful. However, the syntax is a lot different than the other modern programming languages e.g. C/C++, Java, Python, Javascript. Practice makes perfect: through coding exercises. …
Let’s say we want to put a REL=NOFOLLOW on all external links in your wordpress posts/pages, we can add a filter to parse the content using the regular expression …
Let’s say, if we want to expand strings that contain dynamic variables, we can use regular expression to do this easily. const varContent = { VAR: "World", } console.log(expand("Hello, …