From 194a93b25beb75d6087dc92cafbb82458ed792d5 Mon Sep 17 00:00:00 2001 From: Simon Cropp Date: Mon, 19 Feb 2024 18:44:06 +1100 Subject: [PATCH] move regex --- src/Consume/Consume.cs | 8 ++++++++ src/Polyfill/Polyfill.nuspec | 2 ++ .../{Polyfill_RegeEx.cs => Regex/Polyfill_Regeex.cs} | 0 src/Polyfill/{ => Regex}/RegexPolyfill.cs | 0 src/TestIncludes.targets | 3 +++ 5 files changed, 13 insertions(+) rename src/Polyfill/{Polyfill_RegeEx.cs => Regex/Polyfill_Regeex.cs} (100%) rename src/Polyfill/{ => Regex}/RegexPolyfill.cs (100%) diff --git a/src/Consume/Consume.cs b/src/Consume/Consume.cs index a7074f5d..9eb2745d 100644 --- a/src/Consume/Consume.cs +++ b/src/Consume/Consume.cs @@ -13,6 +13,7 @@ using System.Runtime.InteropServices; using System.Runtime.Versioning; using System.Text; +using System.Text.RegularExpressions; using System.Threading; using System.Threading.Tasks; #pragma warning disable CS4014 @@ -198,6 +199,13 @@ async Task StreamReaderReadAsync() var reader = new StreamReader(new MemoryStream()); var read = await reader.ReadAsync(memory); } + + void RegexIsMatch() + { + var regex = new Regex("result"); + regex.IsMatch("value".AsSpan()); + } + async Task StreamReadAsync() { var input = new byte[] diff --git a/src/Polyfill/Polyfill.nuspec b/src/Polyfill/Polyfill.nuspec index 9d340323..b447dd2e 100644 --- a/src/Polyfill/Polyfill.nuspec +++ b/src/Polyfill/Polyfill.nuspec @@ -27,6 +27,8 @@ target="contentFiles/cs/netstandard2.0/Polyfill/StringInterpolation"/> + Pollyfill\PlatformCompatibility\%(RecursiveDir)%(Filename).cs + + Pollyfill\Regex\%(RecursiveDir)%(Filename).cs + \ No newline at end of file