TE
科技回声
首页24小时热榜最新最佳问答展示工作
GitHubTwitter
首页

科技回声

基于 Next.js 构建的科技新闻平台,提供全球科技新闻和讨论内容。

GitHubTwitter

首页

首页最新最佳问答展示工作

资源链接

HackerNews API原版 HackerNewsNext.js

© 2025 科技回声. 版权所有。

Regular Expressions in 100 lines of Scala

40 点作者 rusbus超过 10 年前

5 条评论

hello_there超过 10 年前
It&#x27;s not so easy to see in the linked article, but the article is actually in 3 parts:<p>Part 1: <a href="http://rcoh.svbtle.com/no-magic-regular-expressions" rel="nofollow">http:&#x2F;&#x2F;rcoh.svbtle.com&#x2F;no-magic-regular-expressions</a><p>Part 2: <a href="http://rcoh.svbtle.com/regular-expressions-part-2" rel="nofollow">http:&#x2F;&#x2F;rcoh.svbtle.com&#x2F;regular-expressions-part-2</a><p>Part 3: <a href="http://rcoh.svbtle.com/no-magic-regular-expressions-part-3" rel="nofollow">http:&#x2F;&#x2F;rcoh.svbtle.com&#x2F;no-magic-regular-expressions-part-3</a><p>It&#x27;s really well done!
WoozyBeet超过 10 年前
There is a similar chapter [1] in the book <i>Beautiful Code</i> in which Brian Kernighan explains how to implement a regular expressions matcher using code written by Rob Pike in C.<p>[1]: <a href="http://www.cs.princeton.edu/courses/archive/spr09/cos333/beautiful.html" rel="nofollow">http:&#x2F;&#x2F;www.cs.princeton.edu&#x2F;courses&#x2F;archive&#x2F;spr09&#x2F;cos333&#x2F;bea...</a>
hyp0超过 10 年前
see also parser combinator approach:<p>reg exp engine in 14 lines of python <a href="https://news.ycombinator.com/item?id=3202313" rel="nofollow">https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=3202313</a>
zerr超过 10 年前
Btw, is Scala still relevant with the coming of Java 9?
评论 #8312498 未加载
评论 #8312076 未加载
评论 #8312781 未加载
bshimmin超过 10 年前
The title is a little misleading - perhaps better would be &quot;A very limited subset of Regular Expressions in 100 lines of Scala&quot;.<p>While the code is concise, this is more a case of &quot;it implements A and B of an X&quot; than &quot;it implements an X, apart from A and B&quot;.<p>Still, all three parts of the series are a good read, and definitely helpful for learning about parsing and about Scala.
评论 #8313298 未加载
评论 #8312388 未加载