作者:手机用户2502937963 | 来源:互联网 | 2023-05-17 11:58
ImtryingtomakeaRegexinJavathatcanparsethefollowingStrings我试图在Java中制作一个可以解析以下字符串的正则表达式
Im trying to make a Regex in Java that can parse the following Strings
我试图在Java中制作一个可以解析以下字符串的正则表达式
g1(g2,g2),g1(g2)
g1(g2(g3,g3),g2),g1(g2)
g1(g2)
I have been trying for hours but I cant make one that can split each example in the following classes.
我已经尝试了几个小时,但我不能制作一个可以拆分以下类中的每个示例。
public class G1{
List list;
}
public class G2{
String g2;
Set g3;
}
Where I need one instance of g1 for each of the groups.
我需要为每个组提供一个g1实例。
Thanks
谢谢
EDIT
编辑
Fixed the classes.
修正了这些课程。
2 个解决方案