Conjecture.Regex
0.29.0
dotnet add package Conjecture.Regex --version 0.29.0
NuGet\Install-Package Conjecture.Regex -Version 0.29.0
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="Conjecture.Regex" Version="0.29.0" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Conjecture.Regex" Version="0.29.0" />
<PackageReference Include="Conjecture.Regex" />
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add Conjecture.Regex --version 0.29.0
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: Conjecture.Regex, 0.29.0"
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package Conjecture.Regex@0.29.0
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=Conjecture.Regex&version=0.29.0
#tool nuget:?package=Conjecture.Regex&version=0.29.0
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
Conjecture.Regex
Regex-based string strategies for Conjecture property-based testing. Generates strings that match (or deliberately don't match) a System.Text.RegularExpressions.Regex pattern, plus pre-canned strategies for common formats (URL, UUID, email, IP, ISO date, credit card) and a ReDoS-vulnerability hunter.
Install
dotnet add package Conjecture.Core
dotnet add package Conjecture.Regex
Usage
using Conjecture.Core;
using Conjecture.Regex;
// Strings matching an arbitrary pattern
Strategy<string> productCodes = Strategy.Matching(@"^[A-Z]{3}-\d{4}$");
// Pre-built canonical formats — shrinks toward typical short examples
Strategy<string> emails = Strategy.Email();
Strategy<string> uuids = Strategy.Uuid();
Strategy<string> urls = Strategy.Url();
Strategy<string> isoDates = Strategy.IsoDate();
// Negative space — values that don't match (useful for boundary tests)
Strategy<string> notEmail = Strategy.NotEmail();
// ReDoS hunter: searches for pathological inputs that exceed maxMatchMs
Strategy<string> attacks = Strategy.ReDoSHunter(@"(a+)+b", maxMatchMs: 5);
API
| Method | Returns | Notes |
|---|---|---|
Strategy.Matching(pattern) / Matching(regex) |
Strategy<string> |
Generates strings the regex matches. |
Strategy.NotMatching(pattern) / NotMatching(regex) |
Strategy<string> |
Generates strings the regex does not match. |
Strategy.Email() / Url() / Uuid() / IsoDate() / Date() / Time() / Ipv4() / Ipv6() / CreditCard() |
Strategy<string> |
Canonical-format strings. |
Strategy.NotEmail() / NotUrl() / NotUuid() / NotIsoDate() / NotCreditCard() |
Strategy<string> |
Negative-space strings for boundary testing. |
Strategy.ReDoSHunter(pattern, maxMatchMs) |
Strategy<string> |
Hunts inputs that drive the regex above maxMatchMs. |
KnownRegex.Email / Url / Uuid / etc. |
Regex |
The compiled patterns the canonical strategies use. |
RegexGenOptions { UnicodeCategories } |
options | Toggle Ascii (default) vs Full Unicode coverage. |
Links
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net10.0 is compatible. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
-
net10.0
- Conjecture.Core (>= 0.29.0)
NuGet packages (1)
Showing the top 1 NuGet packages that depend on Conjecture.Regex:
| Package | Downloads |
|---|---|
|
Conjecture.JsonSchema
JSON Schema-driven generation for Conjecture property-based testing. |
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 0.29.0 | 149 | 5/9/2026 |
| 0.28.0 | 157 | 5/9/2026 |
| 0.27.1 | 224 | 4/28/2026 |
| 0.26.0 | 145 | 4/27/2026 |
| 0.25.0 | 143 | 4/27/2026 |
| 0.24.0 | 140 | 4/26/2026 |
| 0.23.0 | 132 | 4/26/2026 |
| 0.22.0 | 114 | 4/26/2026 |
| 0.21.0 | 115 | 4/26/2026 |
| 0.20.0 | 116 | 4/25/2026 |
| 0.19.0 | 99 | 4/25/2026 |
| 0.18.0 | 106 | 4/23/2026 |
| 0.17.0 | 120 | 4/23/2026 |
| 0.16.0 | 104 | 4/22/2026 |
| 0.15.0 | 101 | 4/22/2026 |
| 0.14.0 | 101 | 4/21/2026 |