从正则表达式匹配到解析
From Regular Expression Matching to Parsing
摘要:
给定正则表达式$R$和字符串$Q$,正则表达式解析问题是确定$Q$是否匹配$R$,如果匹配,则确定它如何匹配,例如,通过将$Q$的字符映射到$R$中的字符。正则表达式解析通过允许我们直接提取匹配的子模式,使查找正则表达式的匹配更加有用,例如,用于从互联网流量分析中提取IP地址或从遗传数据库中提取基因组的子部分。我们提出了一个新的通用技术,有效地转换成算法,可以构造相应的映射,确定一个字符串$Q$是否匹配正则表达式$R$的一大类算法。因此,我们获得了第一个有效的线性空间解决方案的正则表达式解析。
英文摘要:
Given a regular expression $R$ and a string $Q$, the regular expression parsing problem is to determine if $Q$ matches $R$ and if so, determine how it matches, e.g., by a mapping of the characters of $Q$ to the characters in $R$. Regular expression parsing makes finding matches of a regular expression even more useful by allowing us to directly extract subpatterns of the match, e.g., for extracting IP-addresses from internet traffic analysis or extracting subparts of genomes from genetic data bases. We present a new general techniques for efficiently converting a large class of algorithms that determine if a string $Q$ matches regular expression $R$ into algorithms that can construct a corresponding mapping. As a consequence, we obtain the first efficient linear space solutions for regular expression parsing.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。