Commit Graph

57 Commits

Author SHA1 Message Date
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
43127455cb Remove match cache 2015-01-28 20:19:35 -05:00
Flaviu Tamas
e027ea9139 Add start to split 2015-01-24 14:58:09 -05:00
Flaviu Tamas
e8d04e142e Fix build on windows
Issues including "pcre.h", but it's not needed anyway! I can just get rid of it.
2015-01-21 16:34:21 -05:00
Flaviu Tamas
1a76edbe02 Add dynlib option 2015-01-20 21:04:24 -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
78afa73e01 Add replace(proc(string): string) 2015-01-19 16:04:53 -05:00
Flaviu Tamas
f34a7dc1f5 Make replace a template
Also required me to fix a name conflict with the format template
2015-01-19 16:04:21 -05:00
Flaviu Tamas
a5693675fb Remove findAll, rename findAllStr to findAll 2015-01-19 15:22:02 -05:00
Flaviu Tamas
31dfa97e3d Improve replacement performance 2015-01-19 08:26:32 -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
Oleh Prypin
41c0060e6d Fix last element when splitting with 0-length match 2015-01-19 14:33:05 +02:00
Flaviu Tamas
260ab8b01b Include pcre sources with library
Advantages are that it works better on non-linux
2015-01-18 18:32:10 -05:00
Flaviu Tamas
7bce00b4cd Add escapeRe 2015-01-18 13:45:56 -05:00
Flaviu Tamas
2598909ffd Add $ operator 2015-01-18 13:10:19 -05:00
Flaviu Tamas
f141737b9f Remove initRegex 2015-01-18 13:04:56 -05:00
Flaviu Tamas
a80617fd4c Disable extended default 2015-01-18 12:41:43 -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
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
01e22abb19 Fix upper bound handling 2015-01-16 19:22:21 -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
f88f4912c2 Add captures in split 2015-01-15 19:53:43 -05:00
Flaviu Tamas
a03d178a56 Implement capture iterator 2015-01-15 19:53:31 -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
cfb0385a02 Add shorthand initialization 2015-01-12 21:50:55 -05:00
Flaviu Tamas
aac71d0fc9 Remove all optional RegexMatch returns 2015-01-12 21:12:23 -05:00
Flaviu Tamas
efb4f7d89c Added some documentation 2015-01-12 21:06:25 -05:00
Flaviu Tamas
e0cdad635b Add findAllStr 2015-01-12 21:00:25 -05:00
Flaviu Tamas
1652cdbaff Unexpose implementation detail 2015-01-12 20:57:20 -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
6fe0de0639 Fix incorrect check
pcre_study can return nil and still succeed
The indicator of failure is a non-nil error message
2015-01-10 20:54:36 -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
4f4a7dfa5b Expose pattern and input string 2015-01-10 19:19:25 -05:00
Flaviu Tamas
ccf5771441 Allow u for unicode matching 2015-01-10 19:12:21 -05:00
Flaviu Tamas
0f4b142c75 Implement toTable(Captures), toSeq(Captures) 2015-01-10 19:10:43 -05:00
Flaviu Tamas
cc33942d89 Revert "Remove Option from exec(Regex, string, int)"
This reverts commit f692042bb8.
2015-01-10 18:00:07 -05:00
Flaviu Tamas
f692042bb8 Remove Option from exec(Regex, string, int) 2015-01-10 16:49:39 -05:00
Flaviu Tamas
0888b84126 Move some things around 2015-01-10 16:41:55 -05:00
Flaviu Tamas
48c29ac905 Add access to capture count and names 2015-01-10 16:39:51 -05:00
Flaviu Tamas
d2c20a32ed captureCount doesn't need to be exposed that way 2015-01-10 16:21:11 -05:00
Flaviu Tamas
721ea11628 Implement captures 2015-01-10 16:20:25 -05:00
Flaviu Tamas
2db1a54710 Implement regex execution 2015-01-10 14:11:43 -05:00