开发者

how to convert string representation of regular expression to automaton with java?

is there any way to convert the string representa开发者_如何学编程tion of a regular expression into automaton with java?


You mean something like this?

Pattern p = Pattern.compile("a*b");
Matcher m = p.matcher("aaaaab");
boolean b = m.matches();

See details at http://download.oracle.com/javase/1.5.0/docs/api/java/util/regex/Pattern.html

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜