Commit Graph

46 Commits

Author SHA1 Message Date
Oleh Prypin
8b8224ecaf Add tests for empty or non-empty match 2015-04-12 17:31:43 +03:00
Oleh Prypin
02c6e7306f Fix skipping an empty match at the end 2015-04-12 15:18:16 +03:00
Flaviu Tamas
ec1758509c Add longer flags
It is now possible to use longer flags instead of the short one-letter ones.
2015-04-11 14:17:53 -04:00
Flaviu Tamas
62a8ab9006 Throw an exception when replacing with a nil value 2015-04-10 13:54:24 -04:00
Oleh Prypin
16577f8167 Fix zero-length matches for multibyte characters 2015-04-10 15:34:22 +03:00
Oleh Prypin
1fe69b94c9 Make splitting an empty string give 1 empty result 2015-04-10 00:19:00 +03:00
Oleh Prypin
2f0375c4c8 Change endpos to inclusive 2015-04-09 23:51:17 +03:00
Oleh Prypin
4e83fc5867 Change capture upper bounds to inclusive 2015-04-09 23:49:50 +03:00
Flaviu Tamas
a1110ebb14 Change RegexMatch from ref to Option
Also associated changes to tests and code
2015-01-31 18:05:49 -05:00
Flaviu Tamas
e027ea9139 Add start to split 2015-01-24 14:58:09 -05:00
Flaviu Tamas
256435e8e3 Fix incorrect property check 2015-01-20 18:23:54 -05:00
Flaviu Tamas
7c24290eec Enable UTF and UCP support in PCRE 2015-01-20 18:14:24 -05:00
Flaviu Tamas
eb2fd618fe Fix accidental negative bounds
See Araq/Nim #1979 for context
2015-01-19 16:16:06 -05:00
Flaviu Tamas
a5693675fb Remove findAll, rename findAllStr to findAll 2015-01-19 15:22:02 -05:00
Flaviu Tamas
e91dd1d956 Add more replace test cases 2015-01-19 07:49:00 -05:00
Flaviu Tamas
a14a2e7a84 Merge remote-tracking branch 'blaxpirit/master'
* blaxpirit/master:
  Fix last element when splitting with 0-length match

Conflicts:
	test/split.nim
2015-01-19 07:43:05 -05:00
Flaviu Tamas
a938d42334 Fix maxsplit to conform to perl 2015-01-19 07:38:09 -05:00
Flaviu Tamas
04699a7587 Add perl split tests 2015-01-19 07:37:04 -05:00
Oleh Prypin
41c0060e6d Fix last element when splitting with 0-length match 2015-01-19 14:33:05 +02:00
Flaviu Tamas
7bce00b4cd Add escapeRe 2015-01-18 13:45:56 -05:00
Flaviu Tamas
f141737b9f Remove initRegex 2015-01-18 13:04:56 -05:00
Flaviu Tamas
ca299504d1 Make study a negatable option instead 2015-01-18 12:49:22 -05:00
Flaviu Tamas
02a93b11aa Add a test case with 0-length match
Thanks Oleh Prypin
2015-01-18 12:31:15 -05:00
Flaviu Tamas
d62b41fa1c s/asTable/toTable/
toTable is more consistent with toSeq
2015-01-18 12:29:10 -05:00
Flaviu Tamas
1bcaa21729 Add maxsplit 2015-01-18 12:28:19 -05:00
Flaviu Tamas
79b43b19a8 Add examples 2015-01-18 12:04:09 -05:00
Flaviu Tamas
447d0e0e8b Add more typical string replace 2015-01-17 22:45:23 -05:00
Flaviu Tamas
4d25a89ba9 Add replace
Also came a cross a find bug with 0-length subject strings
2015-01-17 16:21:25 -05:00
Flaviu Tamas
a7ce05b42f Add tests for claims in documentation 2015-01-16 20:04:38 -05:00
Flaviu Tamas
d4450aa1ee Add additional tests for match 2015-01-16 19:12:05 -05:00
Flaviu Tamas
1a5401ebcf s/match/find/g
The implementation needs to match the API after all ;)
2015-01-16 19:11:28 -05:00
Flaviu Tamas
c0c0920d19 Add another split testcase
Thanks Oleh Prypin for the suggestion!
2015-01-15 17:39:20 -05:00
Flaviu Tamas
d649cec033 s/asSeq/toSeq
`toSeq` is a better name for it
2015-01-15 17:39:14 -05:00
Flaviu Tamas
aee43d976b Remove unnecessary options 2015-01-14 20:12:53 -05:00
Flaviu Tamas
aac71d0fc9 Remove all optional RegexMatch returns 2015-01-12 21:12:23 -05:00
Flaviu Tamas
c4cb781c3d Flip parameter string-pattern order 2015-01-12 20:56:34 -05:00
Flaviu Tamas
2474758ed5 Implement match, find, split 2015-01-12 20:09:19 -05:00
Flaviu Tamas
fb51221aa8 Expose the pattern string, rename some procs 2015-01-10 20:36:34 -05:00
Flaviu Tamas
d7dbf7e011 Rename exec(...) and extend it 2015-01-10 19:23:15 -05:00
Flaviu Tamas
0f4b142c75 Implement toTable(Captures), toSeq(Captures) 2015-01-10 19:10:43 -05:00
Flaviu Tamas
48c29ac905 Add access to capture count and names 2015-01-10 16:39:51 -05:00
Flaviu Tamas
721ea11628 Implement captures 2015-01-10 16:20:25 -05:00
Flaviu Tamas
be984d3b07 Change test execution technique 2015-01-10 12:31:03 -05:00
Flaviu Tamas
00b047a660 Implement foundation for named captures 2015-01-10 11:27:46 -05:00
Flaviu Tamas
bfba4b9983 Remove DUPNAMES option
It makes the rest of the implementation more complicated and is confusing
anyway. The user expects a 1:1 mapping between a match and a name
2015-01-10 08:16:09 -05:00
Flaviu Tamas
685e4a1f0b Add unit tests 2015-01-09 19:41:12 -05:00