DataRow drBlank = dsList.Tables[0].NewRow();
drBlank["IsLabelPrinted"] = 0;
drBlank["GroupID"] = -1;
dsList.Tables[0].Rows.Add(drBlank);
dsList.AcceptChanges();
Tuesday, September 8, 2009
IP address regex
///
/// Validate that String is an IP address.
/// Between 0.0.0.0 and 255.255.255.255
///
protected Regex regIP = new Regex(
@"(?2[0-4]\d|25[0-5]|[01]?\d\d?)\.(?2[0-4]\d|25"
+ @"[0-5]|[01]?\d\d?)\.(?2[0-4]\d|25[0-5]|[01]?\d\d?)\.(?"
+ @"2[0-4]\d|25[0-5]|[01]?\d\d?)",
RegexOptions.IgnoreCase
| RegexOptions.CultureInvariant
| RegexOptions.IgnorePatternWhitespace
| RegexOptions.Compiled
);
/// Validate that String is an IP address.
/// Between 0.0.0.0 and 255.255.255.255
///
protected Regex regIP = new Regex(
@"(?
+ @"[0-5]|[01]?\d\d?)\.(?
+ @"
RegexOptions.IgnoreCase
| RegexOptions.CultureInvariant
| RegexOptions.IgnorePatternWhitespace
| RegexOptions.Compiled
);
Subscribe to:
Posts (Atom)