regex



ritratto di dbanchero

Regex widget

An interactive widget for trying out regular expressions for JavaScript, and other languages (such as Sed, Ruby, or Perl). It has a simple user interface, case insensitive switch, global switch, and match index array view.

categorie:


ritratto di dbanchero

Validare sintatticamente il codice fiscale

Semplice e blanda espressione regolare per validare il codice fiscale (non tiene conto delle omocodie).

/^[a-z]{6}[0-9]{2}[abcdehlmprst][0-9]{2}[a-z0-9]{5}$/i



ritratto di dbanchero

Comparing E-mail Address Validating Regular Expressions

I wanted to find a regular expression to validate e-mail addresses, but when I searched I found dozens of slightly different versions of the same expression. Almost all of them had people leaving comments about how it failed to validate or invalidate some rare but completely valid/invalid address syntax. But dispite all the criticism, I couldn't find a definitive "best" expression. So, I setup arrays of some of the most promising expressions as well as a (hopefully) complete sampling of valid and invalid addresses.



ritratto di dbanchero

Regular-Expressions.info

Tutorial esempi e riferimenti sul mondo delle espressioni regolari, dette anche regex