Commit graph

80 commits

Author SHA1 Message Date
whiterock
ef9fb39cdf added note to re constructor regarding performance (#13224)
Since I was new to regex I did not know that there is a compilation going on with ``re"[abc]"`` constructor and so I followed the other examples in the docs blindly, that is I just put the constructor directly in the arguments of match, find, etc., which was inside a loop and then wondered why my performance was so bad. Of course putting it outside the loop made it vastly more performant. People like me would benefit from the small note I added I would think :)
2020-01-22 16:02:16 +01:00
Araq
bafb4f119c ported re.nim to ARC 2019-12-24 17:33:27 +01:00
3n-k1
0944b0f441 [backport] Fix style issues in lib/, tools/, and testament/. Fixes #12687. (#12754) 2019-11-28 08:32:11 +01:00
LemonBoy
7d217a71d3 Render deprecated pragmas (#8886)
* Render deprecated pragmas
* fix the expected html
* clean up the documentation regarding deprecations
* fix typo
* fix system.nim
* fix random
2019-06-03 10:15:20 +02:00
Miran
9d4190a5cc fixes #11139 (re.nim memory leak) (#11265)
Use the same PCRE function for freeing up the memory as nre.nim does.
2019-05-16 21:06:31 +02:00
Araq
eeae88d81e live with the hacks, PCRE's design is crap 2019-03-19 15:49:24 +01:00
Andreas Rumpf
cd9caf09d1 pcre.nim: added pcre_free and removed hacks in nre and re.nim 2019-03-19 12:48:54 +01:00
Kobi
dd422bfb0f fix replacef typo in example 2019-02-13 23:30:14 +01:00
Miran
214f48eae9
Remove long deprecated stuff (#10332) 2019-01-18 07:18:32 +01:00
Denis Lisovik
8b4a910c91 fix split proc ignored maxsplit argument. Proc split didn't pass maxsplit argument to split iterator 2018-11-11 18:40:43 +03:00
Andreas Rumpf
8955470644 fixes #9306 properly, fixes #9306 2018-10-14 11:19:51 +02:00
Josh Goebel
38454c6951 Fix type in docs (#9362) 2018-10-14 08:44:36 +02:00
Araq
8ab6fa1be2 fixes #9306 2018-10-11 16:15:35 +02:00
Araq
18859cbaa1 make nimweb compile again 2018-08-14 01:36:02 +02:00
Andreas Rumpf
dae5450947 WIP: disallow 'nil' for strings and seqs 2018-08-13 11:41:33 +02:00
Kaushal Modi
0321ea36c9 Fix typo: PRCE -> PCRE 2018-06-05 12:58:23 -04:00
Andreas Rumpf
e2094bc6f4 make re.split consistent with strutils.split and other programming languages; refs #7278 2018-03-05 21:39:13 +01:00
Araq
0c28dcd9e2 Cleanup docs about re.nim 2018-03-05 13:20:49 +01:00
Araq
01304db5b2 re.nim: removed deprecated symbols 2017-11-28 01:57:44 +01:00
Araq
d0d02c2fe3 re.nim: Make tests green and deprecate 'parallelReplace'; it should be 'multiReplace' for consistency with strutils.nim 2017-11-28 01:57:44 +01:00
Dominik Picheta
aa96343f1d Remove reExtended from re constructor. Fixes #5627. (#6514)
* Remove reExtended from re constructor. Fixes #5627.

* Implement `rex` procedure as requested by @Araq.
2017-10-20 21:43:34 +02:00
Anatoly Galiulin
279e4b0451 Fixes #5382 2017-02-13 13:35:40 +01:00
jlp765
704eae8495 re additions for buffer (cstring) RE matching (#5117)
* Replace expr with untyped

* Add buffer (cstring) related procs
Replace expr with untyped
Replace testing assert() procs with doAssert()

* make the string variants call the cstring variants in order to fight code size

* Remove redundant proc

* fix casting of cstring
add init of variables (identified by verbosity:3)

* Speed up - use pattern.e for exec()
inline some procs
2017-01-16 15:55:15 +01:00
Andreas Rumpf
3715a5ac91 Merge pull request #4814 from scriptum/rpg-pcre-jit
Enable JIT in PCRE to improve regular expressions performance
2016-10-24 19:07:30 +02:00
Araq
b8325181d1 EIO is called IOError now 2016-09-28 23:39:56 +02:00
Pavel Roschin
61755945d2 Enable JIT in PCRE to improve regular expressions performance 2016-09-23 01:13:06 +03:00
Andreas Rumpf
112cde69c8 de-deprecate re.nim 2016-06-13 12:18:44 +02:00
Andreas Rumpf
1a88c01f92 documentation build cleaned up 2016-05-31 03:04:45 +02:00
Araq
8be9e46403 udpated the compiler and tester to use getOrDefault 2015-10-13 14:10:33 +02:00
Adam Strzelecki
43bddf62dd lib: Trim .nim files trailing whitespace
via OSX: find . -name '*.nim' -exec sed -i '' -E 's/[[:space:]]+$//' {} +
2015-09-04 23:03:56 +02:00
patrick dw
15e7fe787a renamed writeln to writeLine in lib 2015-06-19 01:02:22 -05:00
Flaviu Tamas
31514550d3 Revert "Base re off of nre"
This reverts commit dc60a51e15.
2015-06-10 17:14:20 -04:00
Flaviu Tamas
a707f8de65 Edit re and nre doc comments 2015-06-07 13:13:04 -04:00
Flaviu Tamas
8caa5cd292 Deprecate re 2015-06-07 13:13:04 -04:00
Flaviu Tamas
15ef227c48 Adjust re for nre's inclusive bounds 2015-06-07 13:13:04 -04:00
Oleh Prypin
dc60a51e15 Base re off of nre 2015-06-07 13:13:04 -04:00
Koala Zen
d620f566b2 Fix comment in re 2015-05-06 09:09:36 -07:00
Andreas Rumpf
1b80e2f296 Merge pull request #2506 from BlaXpirit/update-pcre
Update and improve PCRE wrapper
2015-04-21 08:58:28 +02:00
Andreas Rumpf
97cb0eb694 Merge pull request #2560 from BlaXpirit/re-nre-hint
Add a hint about NRE library to 're' module
2015-04-15 17:32:21 +02:00
Oleh Prypin
aa327efa98 Add a hint about NRE to 're' module 2015-04-14 23:26:53 +03:00
Oleh Prypin
ff25c1272f Deprecate constant regular expression strings 2015-04-14 22:30:21 +03:00
Oleh Prypin
fd8c6d0a32 Fix deprecation warnings in re 2015-04-10 16:12:54 +03:00
Andreas Rumpf
2b8f8bbf19 Merge pull request #2502 from def-/pcre
Fix infinite loop in re.findAll
2015-04-10 01:16:01 +02:00
def
69d38f82a5 Fix infinite loop in findAll 2015-04-09 17:22:44 +02:00
def
ce0c4a8b58 Clean up re module a bit 2015-04-09 17:22:33 +02:00
Joseph Turner
7ee6c72b51 Adds test case to is isMainModule block
Adds the test case that originally caused the bug, issue #2418.
2015-04-08 21:58:31 +01:00
Joseph Turner
13e5a9ea6c Fixes matching error #2418
Fixes the split iterator, the main problem was with the incrementation
of 'last'. Last was first incremented to the index of the first
character after the match, but was then incremented again at the
beginning of the while loop. This caused a problem if that character
after the first match, also matched the regular expression.
2015-04-08 17:00:28 +01:00
Simon Hafner
26749de828 re.match returns true on zero-length match #2354 2015-03-16 15:05:02 -05:00
Andreas Rumpf
1ca2db0273 Merge pull request #2260 from oderwat/upd-deprecated-repeats
Updates to remove deprecated repeatStr() and repeatChar() from all files.
2015-03-04 16:42:13 +01:00
Johanna Berewinkel
12e4a62b44 Fixed examples in the documentation of module re (proc replace and proc replacef) 2015-03-04 09:05:30 +01:00