Yesterday I translated the response from RegEx match open tags except XHTML self-contained tags with its famous snippet of code:
You can not parse [X] HTML with regular expressions because HTML can not be parsed with regex. Regex is no...
Question
How to validate an e-mail that accepts all Latin characters?
By Latin characters I mean accented letters, ñ , ç , and all those used by languages such as Spanish, Portuguese, Italian ... Latin.
Context
The goal...
I want to have in Javascript a function that uses regular expressions to add things to the edges of certain words in a text.
Example, I want to replace this:
The swift Indian bat ate happy cardillo and kiwi. The stork played the saxop...
The file% co_of% validation date JS fails if you put as days 10 and 20.
The code is this:
function validaEdat(){
vesSumant();
vfalladata = false;
//Comprovació de la data de naixement i el correu electrònic
var vregexN...
The following example is published in link :
function escapeRegExp(string) {
return string.replace(/[.*+?^${}()|[\]\]/g, '\$&');
}
Is this the safe way to escape a string provided by the end user, for example through a dialog box?...
I have the following simple code:
<input id="nick" type="text"/>
<script>
var c = document.getElementById('nick').value
</script>
I need to remove a part of the name, only if it has brackets [] .
So if you have thi...
I'm using the JQuery autocomplete library. I currently have a function that decodes HTML entities of numeric type - > Ñ , but what I do not know is how to integrate entities of this type into the function - > &...
I have the following regular expression
/^(([^<>()\[\]\.,;:\s@\"]+(\.[^<>()\[\]\.,;:\s@\"]+)*)|(\".+\"))@(([^<>()[\]\.,;:\s@\"]+\.)+[^<>()[\]\.,;:\s@\"]{2,})$/i
To validate emails, I must also validate that the email...
I try to make a method that finds and replaces words using regular expressions. The point is that I must be able to find and replace the word regardless of whether it has uppercase letters or not. This is the code that I carry:
public String r...
I have the following string:
Var text='¡Hola $var1$! Gracias $var2$'
How can I replace what is between $ by the value of the variable.
Example:
var1="Juan", var2="Pedro"
Resultado='¡Hola Juan! Gracias Pedro'
The text can have more var...