Oleh Prypin
2f0375c4c8
Change endpos to inclusive
2015-04-09 23:51:17 +03:00
Oleh Prypin
7e44c08270
Change endpos default from -1 to int.high
2015-04-09 23:51:06 +03:00
Oleh Prypin
4e83fc5867
Change capture upper bounds to inclusive
2015-04-09 23:49:50 +03:00
Flaviu Tamas
763e902b65
Remove renderBounds()
...
A debug proc, it's not really useful and throws warnings anyway.
2015-03-05 10:42:37 -05:00
Flaviu Tamas
e5e5970d93
Fix broken logic in 7296c6d
...
Thanks @fowlmouth for pointing this problem out in IRC.
2015-03-04 21:45:56 -05:00
Flaviu Tamas
ab6e83ad41
Fix tests broken in 7296c6d
...
7296c6d doesn't do any nil checking, so it segfaults on `==` on `Regex`
2015-03-04 19:29:35 -05:00
Flaviu Tamas
b556bd9abf
Fix "could not import: pcre_stack_guard"
...
kanaka/mal#20 related, seems like some systems have older PCREs, without
pcre_stack_guard. Since it isn't expclitly used, this will *hopefully* prevent
errors from occurring.
2015-03-04 19:15:53 -05:00
Flaviu Tamas
7296c6d649
Add equality operator for RegexMatch and Regex
...
- Technically a breaking change, but I doubt anyone depends on a compile-time
error for long ;)
2015-03-03 18:48:35 -05: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
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