Skip to content

Releases: sharplet/Regex

MetaPods

02 Mar 17:41
76c2b73
Compare
Choose a tag to compare

Improves the CocoaPods spec metadata by explicitly annotating the license file as "MIT". Thanks @AlexeyVasilyevRN!

Comments Enabled

21 Apr 22:16
a819aed
Compare
Choose a tag to compare

New:

  • Adds a new option regex option .allowCommentsAndWhitespace, allowing for richer, self-documenting regular expression patterns. (#66 — thanks @remithaunay!)

Improved:

  • Updated internals to use the modern built in conversions between NSRange and Range<String.Index>. This should improve performance and potentially correctness! (#69)

It Just Feels Better

29 Mar 22:05
3bf30ed
Compare
Choose a tag to compare

Say hello to Regex version 2, including support for Swift 5! This release adds no new functionality, but drops support for Swift versions less than 4.2. Regex 2 should otherwise be fully compatible with Regex 1.1.

Swift Fourtification

04 Aug 20:05
Compare
Choose a tag to compare

Regex now speaks Swift 4! 🎉

Added:

  • The Regex type now conforms to Codable, so you can encode and decode regular expressions to your heart's content. (#52)
  • MatchResult has a new range property. (#54, thanks @mezhevikin!)
  • To go with MatchResult.range, there's also the captureRanges property, allowing you to work with the ranges of capture groups. (#59)

Fixed:

Thanks for using Regex!

1.0.0: A Regex for the future

13 Jun 19:08
d509485
Compare
Choose a tag to compare

Regex is now officially at 1.0.0! 🎉

Here's a quick hit list of features:

  • Easily and safely create regular expressions
  • When creating a regular expression from a static string, no error handling required
  • Great pattern-matching support via Regex.lastMatch
  • Type safe access to capture groups
  • Convenient extensions to String to support find and replace

I hope you enjoy using Regex!

0.4.3

12 Dec 15:27
d65b50c
Compare
Choose a tag to compare
0.4.3 Pre-release
Pre-release

Fixes a build failure when using Swift Package Manager.

0.4.2

25 Sep 22:23
Compare
Choose a tag to compare
0.4.2 Pre-release
Pre-release

This should add full Swift 3 support for swiftpm and CocoaPods users. Carthage users should be able to opt into Swift 3 using the --toolchain option to carthage build.

Breaking changes to drop Swift 2 support and adopt the Swift API Design Guidelines will be made in a future release.

0.4.1

15 Sep 09:39
Compare
Choose a tag to compare
0.4.1 Pre-release
Pre-release

Added:

  • New DotMatchesLineSeparator option allows . to match new line characters such as \n. Thanks @ninjaprawn!

Fail Me...Maybe?

22 Aug 15:40
Compare
Choose a tag to compare
Fail Me...Maybe? Pre-release
Pre-release

Added:

  • New initialiser Regex.init(string:) that throws if the pattern is invalid. Previously it wasn't possible to recover from this scenario.

Changed:

  • The existing Regex.init(_:) initialiser now accepts a StaticString instead of a String (meaning that the string must exist statically at compile time), and will trap if an invalid pattern is provided. For dynamically created strings, use Regex.init(string:) instead.

Removed:

  • Regex no longer conforms to StringLiteralConvertible. Use Regex.init(_:) instead.

Regex now supports Xcode 8 and Swift 2.3!

Replaceable

01 Feb 03:31
Compare
Choose a tag to compare
Replaceable Pre-release
Pre-release

Added

  • New String methods for performing find and replace operations (#31)
    • replaceFirstMatching(_:with:) - replaces the first match of the given regex with the replacement template
    • replaceAllMatching(_:with:) - replaces all matches of the given regex with the replacement template
    • Non-muting versions of each method for convenience
  • New Regex.lastMatch static property that gives access to the last match result when pattern matching (#27)