我的网址像
https://example.com/helloworld/.@==imhere
或
https://example.com/helloworld/.@==imnothere?param1=value1
我想从这些URL中提取值imhere
或imnothere
。>>
Pattern.compile("(?<=helloworld\\/@\\.id==).*(?=\\?)");
这个问题没有找到吗? (第一种情况)与模式不匹配。
有人可以帮我解决这个问题吗?
我有一个网址,例如https://example.com/helloworld/.@==imhere或https://example.com/helloworld/.@==imnothere?param1=value1我想在此处提取值或来自这些网址的链接。模式......
此表达式应该这样做:
要在特定短语之后匹配下一个空格,问号或字符串结尾,Java正则表达式是这样的: