Branch: refs/heads/main
Revision: 7fdba55
Author: slnguyen
Link: Updating regex tertiary methods by slnguyen · Pull Request #19622 · chapel-lang/chapel · GitHub
Log Message:
Merge pull request #19622 from slnguyen/regex_tertiary
This PR addresses #17226 and does the following:
- Replaces string.search and bytes.search (returns a regexMatch) with 'string.find' and bytes.find, which returns a 'byteIndex' that represents the offset where a regular expression and string/byte match
- Replaces 'string.matches' and bytes.matches (returns a regexMatch) with string.startsWith and bytes.startsWith, which returns true if a string/byte starts with a given regular expression
- Deprecates string.matches and bytes.matches
- Renames the pattern argument to sep in string.split and bytes.split
- Updates current tests and adds deprecation tests to reflect the above changes
- Adds documentation to reflect the above changes
Reviewed by @lydia-duncan
Modified Files:
A test/deprecated/regexTertiary.chpl
A test/deprecated/regexTertiary.good
M modules/packages/TOML.chpl
M modules/standard/Regex.chpl
M test/deprecated/regexpSearch.good
M test/library/draft/Shlex/Shlex.chpl
M test/patterns/cltools/grep/grep.chpl
M test/regex/bytes/cast.chpl
M test/regex/bytes/cast.good
M test/regex/ferguson/regex-no-leak.good
M test/regex/ferguson/regexp.chpl
M test/regex/ferguson/regexp.good
M test/types/cptr/ptr_cast_to_string.chpl
Compare: https://github.com/chapel-lang/chapel/compare/58bfc69f8688...7fdba5571d1c