A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://github.com/VerbalExpressions/CSharpVerbalExpressions below:

GitHub - VerbalExpressions/CSharpVerbalExpressions

CSharp Regular Expressions made easy

VerbalExpressions is a CSharp library that helps to construct difficult regular expressions.

Install-Package VerbalExpressions-official

When first building the solution there will be external libraries that are missing since GitHub doesn't include DLLs. The best way to get these libraries into your solution is to use NuGet. However, since the project is now using NuGet Package Restore, manually installing the packages may not be necessary. Below lists the libraries that are required if manual installing is needed.

The libraries that are needed to build are the following:

Here's a couple of simple examples to give an idea of how VerbalExpressions works:

Testing if we have a valid URL
		[TestMethod]
		public void TestingIfWeHaveAValidURL()
		{
			// Create an example of how to test for correctly formed URLs
			var verbEx = new VerbalExpressions()
						.StartOfLine()
						.Then( "http" )
						.Maybe( "s" )
						.Then( "://" )
						.Maybe( "www." )
						.AnythingBut( " " )
						.EndOfLine();

			// Create an example URL
			var testMe = "https://www.google.com";

			Assert.IsTrue(verbEx.Test( testMe ), "The URL is incorrect");

			Console.WriteLine("We have a correct URL ");
		}

Coming...

You can view all implementations on VerbalExpressions.github.io


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4