regex - 在 Parenscript 中使用正则表达式(正则表达式)
问题描述
我正在尝试 Parenscript。在尝试使用正则表达式函数时,我得到了意外的输出。例如,参考手册显示:
(regex "foobar")
/foobar/;
(regex "/foobar/i")
/foobar/i;
但是,在我的 repl 中,我收到错误,即函数 (parenscript:regex..) 未定义。
The function parenscript:regex is undefined.
[Condition of type undefined-function]
Restarts:
0: [continue] Retry using regex.
1: [use-value] Use specified function
2: [retry] Retry SLIME REPL evaluation request.
3: [*abort] Return to SLIME's top level.
4: [abort] abort thread (#<thread "repl-thread" running {1002319B63}>)
Backtrace:
0: (sb-impl::retry-%coerce-name-to-fun regex nil)
1: (sb-int:simple-eval-in-lexenv (regex "foobar") #<NULL-LEXENV>)
2: (eval (regex "foobar"))
--more--
我尝试将命名空间更改为 cl-user、ps 等,但没有任何效果。OTOH,只是为了检查,我尝试使用函数 sin、random 等,并且有效。我的意思是,在 repl 中输入 (sin 0.1) 会产生预期的输出。
任何帮助都会有很大帮助。
解决方案
推荐阅读
- python - 使用 Python 输出多个随机密码
- react-native - 仅反应原生构建(android)
- javascript - 如何使用 ajax 通信 python-mysql 和 js?
- c# - 在 .Net Dynamics CRM 应用程序中保存要联系的父帐户
- asp.net-core - 常规方法和异步方法有什么区别(OnGet vs OnGetAsync)
- firebase - 为什么functions.config() 返回{}?
- python - Python 编写 CSV 文件
- c# - c#定义接收方法作为参数的方法,具有不同的重载
- python - 使用自己的模型作为用户登录
- django - Django 2.0:ModelChoiceField 中的 TextInput 显示 id 而不是值