- Posts Tagged ‘regex’

JavaScript: Strip HTML, and get UpperCase and LowerCase words

I was looking for getting all words in uppercase in HTML text using Regex. After solving through Googling and trial and error, I thought to extend the code to return all lowercase words too. <!--Actually I was helping someone on forum and there the question was only for capturing Upper… (Continue)

PHP: Regex Find and Replace any Word (string or text) at one go

How to achieve find and replace in one go? I tried searching for find and replace at a time then I could not find the direct answer on net. There is find/search at a time or replace. I want to do both. PHP regular expression function preg_replace_callback() can achieve this… (Continue)

Form Input Validation Technique in PHP

I am sure you have written form's input field validation code using your server side scripts. Form validation is most common code we have to write. We generally validate our form for name, age, sex, phone, email and others. For these fields, if we get little complex validation we start… (Continue)