由买买提看人间百态

boards

本页内容为未名空间相应帖子的节选和存档,一周内的贴子最多显示50字,超过一周显示500字 访问原贴
JobHunting版 - 请教一个面试题,在大量URL中找一个有wildcard的pattern
相关主题
leetcode regular expression match的问题Wildcard Matching 和 Regular Expression Matching 区别是什么
Bloomberg C++ 软工面试题汇总如果面试遇到 regular expression match 或者 wildcard matching之类的
请教一个关于POSIX的面试题leetcode这两题不是完全一样吗?
implement a simple regular expression match? (转载)Regular expression matching 在什么输入下时间复杂度是O(2^n)?
leetcode里最弄不明白的两道题面试遇到了Regular Expression Matching时间复杂度是多少?
面试题求助请推荐Multithread的学习资料。
what is regular expression's meaning?面试题: Multithreads 之间怎么通信?
regular expression match的greedy解法说说flextrade 的 onsite 经历
相关话题的讨论汇总
话题: regular话题: pattern话题: 中找话题: url
进入JobHunting版参与讨论
1 (共1页)
g*****u
发帖数: 298
1
比如pattern为www.i*a*c.com,那么应该找到www.icabc.com, www.isdfac.com,...
怎么建立index及search呢?我想用suffix tree,但是具体算法应该怎样写呢?
g*****u
发帖数: 298
2
up
我记得小尾羊做过的。。。
s*********l
发帖数: 103
3

Regular Expressions
Java, C#, Python, Perl have built-in support for regular expressions.
For C/C++ users, there are POSIX C API's for manipulating regular
expressions and the Boost.Regex library from boost.
http://www.boost.org/doc/libs/release/libs/regex
http://onlamp.com/pub/a/onlamp/2006/04/06/boostregex.html
Regular expression matching can be implemented using finite automata.
http://swtch.com/~rsc/regexp/
collects resources about implementing regular expression search efficiently

【在 g*****u 的大作中提到】
: 比如pattern为www.i*a*c.com,那么应该找到www.icabc.com, www.isdfac.com,...
: 怎么建立index及search呢?我想用suffix tree,但是具体算法应该怎样写呢?

h*********e
发帖数: 56
4
如果非得用suffix tree,能不能转化成exact set matching?
"www.i" occurs at index X = {x1, x2...}
"a" occurs at index Y = {y1, y2...}
"c.com" occurs at index Z = {z1, z2...}
Building the suffix tree and matching can be done in linear time. Then,
pattern occurs in text iff the following has solution:
y-x >= 5
z-y >= 1
x, y, z from X, Y, Z
不知道这方程组有没有线性解法。
s*********l
发帖数: 103
5
This paper
Junghoo Cho, Sridhar Rajagopalan: A Fast Regular Expression Indexing Engine.
ICDE 2002: 419-430
http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.18.6659&rep=rep1&type=pdf
addresses scale and performance issues when matching regular expressions (a
regex) against a large corpus.

efficiently

【在 s*********l 的大作中提到】
:
: Regular Expressions
: Java, C#, Python, Perl have built-in support for regular expressions.
: For C/C++ users, there are POSIX C API's for manipulating regular
: expressions and the Boost.Regex library from boost.
: http://www.boost.org/doc/libs/release/libs/regex
: http://onlamp.com/pub/a/onlamp/2006/04/06/boostregex.html
: Regular expression matching can be implemented using finite automata.
: http://swtch.com/~rsc/regexp/
: collects resources about implementing regular expression search efficiently

g*****u
发帖数: 298
6
谢谢,我以前见过这paper,还有Yates and Gonnet那篇,好长啊。。
能否简单说一下它的中心思想是什么?

Engine.
a

【在 s*********l 的大作中提到】
: This paper
: Junghoo Cho, Sridhar Rajagopalan: A Fast Regular Expression Indexing Engine.
: ICDE 2002: 419-430
: http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.18.6659&rep=rep1&type=pdf
: addresses scale and performance issues when matching regular expressions (a
: regex) against a large corpus.
:
: efficiently

1 (共1页)
进入JobHunting版参与讨论
相关主题
说说flextrade 的 onsite 经历leetcode里最弄不明白的两道题
software engineer in northern virginia (转载)面试题求助
征c++软件工程师 从associate level到senior level都要what is regular expression's meaning?
征web软件工程师 从associate level到senior level都要regular expression match的greedy解法
leetcode regular expression match的问题Wildcard Matching 和 Regular Expression Matching 区别是什么
Bloomberg C++ 软工面试题汇总如果面试遇到 regular expression match 或者 wildcard matching之类的
请教一个关于POSIX的面试题leetcode这两题不是完全一样吗?
implement a simple regular expression match? (转载)Regular expression matching 在什么输入下时间复杂度是O(2^n)?
相关话题的讨论汇总
话题: regular话题: pattern话题: 中找话题: url