j***b 发帖数: 5901 | 1 regular expression一般 是 在一个字符串里面搜索patern.
有没有办法看一个字符串是否符合regular expression得一部分?
比如字符串是xay,regular expression是/x[abcd]ysdf/字符串
匹配了patern得一部分。有没有办法用regular expression做到这个? |
l***t 发帖数: 81 | 2 pattern would not match for the substrings.
【在 j***b 的大作中提到】 : regular expression一般 是 在一个字符串里面搜索patern. : 有没有办法看一个字符串是否符合regular expression得一部分? : 比如字符串是xay,regular expression是/x[abcd]ysdf/字符串 : 匹配了patern得一部分。有没有办法用regular expression做到这个?
|
j***b 发帖数: 5901 | 3 有没有软件根据一组regular expression可以生成自动机?
【在 l***t 的大作中提到】 : pattern would not match for the substrings.
|
k****f 发帖数: 3794 | 4 yacc
【在 j***b 的大作中提到】 : 有没有软件根据一组regular expression可以生成自动机?
|
l***t 发帖数: 81 | 5 Regular expression is equal to automaton.
flex can generate code for the automaton.
【在 j***b 的大作中提到】 : 有没有软件根据一组regular expression可以生成自动机?
|
c*****t 发帖数: 1879 | 6 Depending on your need and language.
There are two types, one is statically generated and another is
dynamically genarted. The statically generate DFA are faster,
and consumes less memory at run time, but they are generated
at compile time. For example, flex for C can generate C code
automata tables. For dyanmically generated ones, they usually
consumes more memory and run slower. So, there are various
implementations that do not generate full automata until actually
needed. For C, you can
【在 j***b 的大作中提到】 : 有没有软件根据一组regular expression可以生成自动机?
|