CSharpVerbalExpressions

  • 所有者: VerbalExpressions/CSharpVerbalExpressions
  • 平台:
  • 許可證: MIT License
  • 分類:
  • 主題:
  • 喜歡:
    0
      比較:

Github星跟蹤圖

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

主要指標

概覽
名稱與所有者VerbalExpressions/CSharpVerbalExpressions
主編程語言C#
編程語言C# (語言數: 1)
平台
許可證MIT License
所有者活动
創建於2013-07-25 16:59:59
推送於2022-01-25 08:55:02
最后一次提交2022-01-25 09:55:02
發布數0
用户参与
星數1.2k
關注者數84
派生數106
提交數97
已啟用問題?
問題數21
打開的問題數10
拉請求數30
打開的拉請求數1
關閉的拉請求數9
项目设置
已啟用Wiki?
已存檔?
是復刻?
已鎖定?
是鏡像?
是私有?