public static GetPostcodeRegex ( string regionId ) : string | ||
regionId | string | The Id of the region to get the postal code regular expression for |
return | string |
/// <summary> /// GetPostcodeRegex gets the postal code regular expression for the CultureInfo /// </summary> /// <param name="cultureInfo">The CultureInfo to get the postal code regular expression for</param> /// <returns>The postal code regular expression for the CultureInfo</returns> public static string GetPostcodeRegex(this CultureInfo cultureInfo) { AssertHasRegionInfo(cultureInfo); RegionInfo regionInfo = new RegionInfo(cultureInfo.Name); return(RegionExtensions.GetPostcodeRegex(regionInfo.TwoLetterISORegionName)); }
/// <summary> /// GetPostcodeRegex gets the postal code regular expression for the RegionInfo /// </summary> /// <param name="regionInfo">The RegionInfo to get the postal code regular expression for</param> /// <returns>The postal code regular expression for the RegionInfo</returns> public static string GetPostcodeRegex(this RegionInfo regionInfo) { return(RegionExtensions.GetPostcodeRegex(regionInfo.TwoLetterISORegionName)); }