Saxonite 1.2.11.3

This commit is contained in:
Andy Howard
2024-03-27 15:05:33 +00:00
parent 2239f37408
commit 496aaeee0b
6 changed files with 28 additions and 6 deletions
@@ -88,6 +88,17 @@ namespace Sarand.Net.Standard.Base.Helpers
return false;
}
// Location URLs. [[https:]//]www.google.*/maps/place/...
private static readonly Regex reLocationUrl = new Regex("^(?:(?:http(?:s)?:)?//)?\\" + Regex.Escape("www.google.") + "\\w{2,3}" + Regex.Escape("/maps/place/") + ".+", RegexOptions.IgnoreCase);
private static readonly Regex reLocationUrl_Alt = new Regex("^(?:(?:http(?:s)?:)?//)?\\" + Regex.Escape("www.google.") + "\\w{2,3}" + Regex.Escape("/maps?") + ".+", RegexOptions.IgnoreCase);
public static bool IsValidLocationUrl(String value)
{
if (!IsValidUrl(value)) return false;
if (reLocationUrl.Matches(value).Count > 0) return true;
if (reLocationUrl_Alt.Matches(value).Count > 0) return true;
return false;
}
// LinkedIn URLs. [[https:]//][www|xx].linkedin.com/in...
private static readonly Regex reLinkedInUrl = new Regex("^(?:(?:http(?:s)?:)?//)?(?:(?:www|\\w{2})\\.)?" + Regex.Escape("linkedin.com/in/") + ".+", RegexOptions.IgnoreCase);
private static readonly Regex reLinkedInUrl_Company = new Regex("^(?:(?:http(?:s)?:)?//)?(?:(?:www|\\w{2})\\.)?" + Regex.Escape("linkedin.com/company/") + ".+", RegexOptions.IgnoreCase);
@@ -133,6 +133,13 @@ namespace Sarand.Net.Standard.Base.Utils
}
}
/// <summary>Remove all duplicate values from the list, case-insensitive.</summary>
public static void RemoveTrailingBlanks(this List<String> values)
{
while (!values.IsEmpty() && StringUtil.IsBlank(values.Last()))
values.RemoveAt(values.Count - 1);
}
//-------------------------------------------------------------------
// M o d i f i c a t i o n
//-------------------------------------------------------------------
+1 -1
View File
@@ -7,7 +7,7 @@
<ItemGroup>
<PackageReference Include="CsvHelper" Version="19.0.0" />
<PackageReference Include="MailKit" Version="2.15.0" />
<PackageReference Include="MailKit" Version="4.3.0" />
<PackageReference Include="Microsoft.AspNetCore.Http" Version="2.2.2" />
<PackageReference Include="Microsoft.AspNetCore.StaticFiles" Version="2.2.0" />
<PackageReference Include="Newtonsoft.Json" Version="13.0.3" />