我应该在Common Lisp中使用哪些正则表达式库? [英] Which regular expression libraries should I use in Common Lisp?

查看:79
本文介绍了我应该在Common Lisp中使用哪些正则表达式库?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试学习Common Lisp,并希望使用正则表达式来解析文本文件。像我这样的初学者最容易使用哪个库?我是否可以假设这取决于我使用的Common Lisp的实现方式?我看到了一些有希望的Google成果,但我认为看到我是否可以从Lispers那里得到一些好的建议也不会受到伤害。谢谢!

I'm trying to learn Common Lisp and want to use regular expressions for parsing a text file. Which library is the easiest to use for a beginner like me? Am I right in assuming it depends on which implementation of Common Lisp I'm using? I see some promising Google results, but I thought it wouldn't hurt to see if I can get some good advice from the Lispers out there. Thanks!

推荐答案

对于初学者,只需使用 CL -PPCRE

For the beginner just use CL-PPCRE. It is fast, robust and stable, and works fine on any implementation.

还有一个小技巧可以使它工作起来更加愉快-添加一个昵称 RE PPCRE

There's also a small trick to make working with it more pleasant - adding a nickname of RE besides PPCRE.

(rename-package "CL-PPCRE" "CL-PPCRE" '("PPCRE" "RE"))

这样您就可以通过以下方式使用它:(re:scan ...

So you'll be able to use it this way: (re:scan ...

这篇关于我应该在Common Lisp中使用哪些正则表达式库?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆