diff options
author | kuanyui <azazabc123@gmail.com> | 2016-01-20 23:24:34 +0800 |
---|---|---|
committer | kuanyui <azazabc123@gmail.com> | 2016-01-20 23:24:34 +0800 |
commit | 81db7359e1a891020ef2e65aa05c2b9e65673254 (patch) | |
tree | 3416765de0a928c65a2668bc9671adf9599b7bac /dev | |
parent | 99c7431cccf7d21956e18cf262d018b709dd57f6 (diff) |
Fix wrong amount of matched in s-matched-positions-all
;; Old version:
(s-matched-positions-all "=\\(.+?\\)=" "This is a =very= simple =sample=." 1)
;;=> ((11 . 15) (16 . 24) (25 . 31))
;; New version:
(s-matched-positions-all "=\\(.+?\\)=" "This is a =very= simple =sample=." 1)
;; => ((11 . 15) (25 . 31))
Diffstat (limited to 'dev')
-rw-r--r-- | dev/examples.el | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/dev/examples.el b/dev/examples.el index 66d4dcb..c1ce10f 100644 --- a/dev/examples.el +++ b/dev/examples.el @@ -144,7 +144,9 @@ (s-matched-positions-all "{{\\(.+?\\)}}" "{{Hello}} World, {{Emacs}}!" 0) => '((0 . 9) (17 . 26)) (s-matched-positions-all "{{\\(.+?\\)}}" "{{Hello}} World, {{Emacs}}!" 1) => '((2 . 7) (19 . 24)) (s-matched-positions-all "l" "{{Hello}} World, {{Emacs}}!" 0) => '((4 . 5) (5 . 6) (13 . 14)) - (s-matched-positions-all "abc" "{{Hello}} World, {{Emacs}}!") => nil) + (s-matched-positions-all "abc" "{{Hello}} World, {{Emacs}}!") => nil + (s-matched-positions-all "=\\(.+?\\)=" "=Hello= World, =Emacs=!" 0) => '((0 . 7) (15 . 22)) + (s-matched-positions-all "=\\(.+?\\)=" "=Hello= World, =Emacs=!" 1) => '((1 . 6) (16 . 21))) (defexamples s-slice-at (s-slice-at "-" "abc") => '("abc") |