-
-
Notifications
You must be signed in to change notification settings - Fork 148
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Implement Patsub ${x/pat/replace} and strip ops ${x#prefix}, etc.
There are two strategies, depending on the pattern. 1) Fixed strings use Python's string methods, e.g. startswith/endswith/replace/slice. 2) Glob patterns are converted to Python regexes. (Character classes aren't currently supported.) Then we use the regex engine for position information and greedy/non-greedy matches. Also: - Added tests. - Fix parsing. - TODO: Unicode Addresses issue #26.
- Loading branch information
Andy Chu
authored and
Andy Chu
committed
Aug 22, 2017
1 parent
0af9b23
commit 8066fd7
Showing
7 changed files
with
241 additions
and
133 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.