swiftlang / swift-experimental-string-processing

An early experimental general-purpose pattern matching engine for Swift.
Apache License 2.0
278 stars 47 forks source link

Fix word boundary matching in `matches(of:)` #744

Closed natecook1000 closed 4 months ago

natecook1000 commented 4 months ago

A prior change incorrectly treated the start of the searchBounds as an always-valid word boundary, which resulted in a word boundary at the start of a pattern unconditionally matching at the restart point when finding all matches in a string.

This change corrects the usage to recognize word boundaries only at the start of the subjectBounds.

rdar://129417643

natecook1000 commented 4 months ago

@swift-ci Please test

natecook1000 commented 4 months ago

@swift-ci Please test Linux platform