0
受「java use Regular Expressions to generate a string」啓發我想知道如何生成與Java中的正則表達式匹配的字符串。生成與Java中的正則表達式匹配的字符串
/**
* Returns a list of {@code count} strings which match the regular
* expression {@code regexp}.
*
* @param regexp the regular expression
* @param count the number of strings to return
* @result a list of {@code count} strings matching {@code regexp}
*/
public static List<String> generate(final String regexp, final int count)
{
// ...
}
謝謝。你怎麼知道如何手動執行它的一般想法? – 2013-05-01 11:41:09
不,我不知道,但你可以聯繫[Wilfred Springer](http://stackoverflow.com/users/136476/wilfred-springer)。他是編寫這個庫的人 – 2013-05-01 11:51:55
查看Xeger的源代碼如何? – 2013-05-01 12:01:26