Skip to content

Commit

Permalink
fin - Finalized changelogs with a fix
Browse files Browse the repository at this point in the history
---

We've made IsValidRegex() smarter since some implementations check the
regex when creating a new Regex instance right away.

---

Type: fin
Breaking: False
Doc Required: False
Backport Required: False
Part: 1/1
  • Loading branch information
AptiviCEO committed Nov 17, 2024
1 parent 239c8e6 commit adebafc
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 6 deletions.
5 changes: 2 additions & 3 deletions CHANGES
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
This version of Textify allows you to form a wide string from a normal string.
This version of Textify allows you to do much more with regular expressions.

### Changes

This release contains a variety of changes, including, but not limited to:

- `[+]` Added `WideString`
- `[+]` Added selective replacement
- `[+]` Added more regex tools

Review the commit history if you want to get a deep insight about the changes.

Expand Down
2 changes: 1 addition & 1 deletion CHANGES.TITLE
Original file line number Diff line number Diff line change
@@ -1 +1 @@
[release] Textify v2.6.0: Widening the Wide!
[release] Textify v2.7.0: Regular Expressions!
13 changes: 11 additions & 2 deletions Textify/Tools/RegexTools.cs
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,17 @@ public static class RegexTools
/// </summary>
/// <param name="pattern">Specified pattern</param>
/// <returns>True if valid; false otherwise</returns>
public static bool IsValidRegex([StringSyntax(StringSyntaxAttribute.Regex)] string pattern) =>
IsValidRegex(new Regex(pattern));
public static bool IsValidRegex([StringSyntax(StringSyntaxAttribute.Regex)] string pattern)
{
try
{
return IsValidRegex(new Regex(pattern));
}
catch
{
return false;
}
}

/// <summary>
/// Determines whether the specified regular expression pattern is valid or not
Expand Down

0 comments on commit adebafc

Please sign in to comment.