CSharpVerbalExpressions

  • Owner: VerbalExpressions/CSharpVerbalExpressions
  • Platform:
  • License:: MIT License
  • Category::
  • Topic:
  • Like:
    0
      Compare:

Github stars Tracking Chart

CSharpVerbalExpressions

CSharp Regular Expressions made easy

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

NuGet

Install-Package VerbalExpressions-official

How to get started

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:

  • NUnit

Examples

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 ");
		}

API documentation

Coming...

Other implementations

You can view all implementations on VerbalExpressions.github.io

Main metrics

Overview
Name With OwnerVerbalExpressions/CSharpVerbalExpressions
Primary LanguageC#
Program languageC# (Language Count: 1)
Platform
License:MIT License
所有者活动
Created At2013-07-25 16:59:59
Pushed At2022-01-25 08:55:02
Last Commit At2022-01-25 09:55:02
Release Count0
用户参与
Stargazers Count1.2k
Watchers Count84
Fork Count106
Commits Count97
Has Issues Enabled
Issues Count21
Issue Open Count10
Pull Requests Count30
Pull Requests Open Count1
Pull Requests Close Count9
项目设置
Has Wiki Enabled
Is Archived
Is Fork
Is Locked
Is Mirror
Is Private