diff --git a/SendsafelyAPI/Utilities/ParseLinksUtility.cs b/SendsafelyAPI/Utilities/ParseLinksUtility.cs index f0f3610..e6e8012 100644 --- a/SendsafelyAPI/Utilities/ParseLinksUtility.cs +++ b/SendsafelyAPI/Utilities/ParseLinksUtility.cs @@ -5,10 +5,17 @@ namespace SendSafely.Utilities { - class ParseLinksUtility + /// + /// Utility for extracting a list of valid SendSafely package links from text input. + /// + public class ParseLinksUtility { - private String REGEX = "(https:\\/\\/[a-zA-Z\\.]+\\/receive\\/\\?[A-Za-z0-9&=\\-]+packageCode=[A-Za-z0-9\\-_]+#keyCode=[A-Za-z0-9\\-_]+)"; + private String REGEX = "(https:\\/\\/[a-zA-Z\\.-]+\\/receive\\/\\?[A-Za-z0-9&=\\-]+packageCode=[A-Za-z0-9\\-_]+#keyCode=[A-Za-z0-9\\-_]+)"; + /// + /// Extract a list of valid SendSafely package links from text. + /// + /// The text input that you want to check for package links. public List Parse(String text) { List links = new List(); @@ -21,10 +28,10 @@ public List Parse(String text) { links.Add(match.Value); } - + } - return links; + return links; } } -} +} \ No newline at end of file