Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Zach Beane
zacl
Commits
43be3b77
Commit
43be3b77
authored
Nov 15, 2016
by
Zach Beane
Browse files
Finish off regexp API.
parent
42bb79f0
Changes
2
Hide whitespace changes
Inline
Side-by-side
package-excl.lisp
View file @
43be3b77
...
...
@@ -42,9 +42,9 @@ longer anonymous, but has a meaningful name name."
(
find
feature
*features*
))
(
defun
excl:match-re
(
pattern
string
&key
(
return
:string
))
(
defun
excl:match-re
(
pattern
string
&key
(
return
:string
)
case-fold
)
(
multiple-value-bind
(
start
end
regs-starts
regs-ends
)
(
scan
pattern
string
)
(
scan
(
create-scanner
pattern
:case-insensitive-mode
case-fold
)
string
)
(
when
(
and
start
end
)
(
ecase
return
(
:index
...
...
@@ -54,11 +54,16 @@ longer anonymous, but has a meaningful name name."
(
map
'list
(
lambda
(
start
end
)
(
subseq
string
start
end
))
regs-starts
regs-ends
))))))))
regs-ends
))))
((
nil
)
t
)))))
(
defun
excl:match-regexp
(
pattern
string
&key
(
return
:string
))
(
excl:match-re
pattern
string
:return
return
))
(
defun
excl:compile-regexp
(
pattern
)
(
create-scanner
pattern
))
(
defmacro
excl:with-output-to-buffer
((
stream
)
&body
body
)
`
(
with-output-to-sequence
(
,
stream
)
...
...
package.lisp
View file @
43be3b77
...
...
@@ -182,7 +182,8 @@
#:lockable-object
)
(
:export
#:match-regexp
#:match-re
#:replace-regexp
)
#:replace-regexp
#:compile-regexp
)
(
:export
#:with-output-to-buffer
)
(
:export
#:def-stream-class
#:terminal-simple-stream
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment