Format:
Recent snippets matching tags of Regular Expression
<asp:RegularExpressionValidator ValidationGroup="Anagrafica" ID="RegularExpressionValidatorEmail" ControlToValidate="TextBoxEmail" ValidationExpression="\w+([-+.']\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*" ErrorMessage="Indirizzo email immesso non valido" EnableClientScript="true" runat="server" />
24 Views
no comments
//Email regex validator Regex regex = new Regex(@"\w+([-+.']\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*"); //Website regex validator Regex regex = new Regex(@"^http\://[a-zA-Z0-9\-\.]+\.[a-zA-Z]{2,3}(/\S*)?$"); //Comments on forum regex validator (max 4000 characters) Regex regex = new Regex(@"^[+_%@:,.'!?"\\\^\&\#\$\*\(\)\-\/a-zA-Z0-9\s]{1,4000}$");
56 Views
no comments
var text = "I (Iceland) Found (Faroe Islands) the Needles (Norway) South (Sweden) of Finland (Finland). Drinks (Denmark) for Everyone (Estonia) Laughed (Latvia) the Little (Lithuania) Neanderthal (Northern Ireland) Selling (Scotland) English (England) Wales (Wales) Inside (Ireland) Northern Europe"; var rg = new Regex(@"\([^)]*\)", RegexOptions.IgnorePatternWhitespace); var replacedStr = rg.Replace(text,"");
131 Views
no comments
using System; using System.Drawing; using System.Collections; using System.ComponentModel; using System.Windows.Forms; using System.Data; using System.Text.RegularExpressions; using System.Text; using System.IO; using System.Reflection;
364 Views
no comments
Subscribe
Discuss
What's new
What is it
New Snippet
Recent Snippets
My Snippets
Web Code
Search
