这是我的示例数据:
406/FG-2000
411/FA-2120
XX-226/2012-DFDF
OASDV-279/1016-FDFFD
我如何在java中使用正则表达式(仅正则表达式)解析
406/FG-2000 -> 406 (from begining to /)
411/FA-2120 -> 411 (from begining to /)
XX-226/2012-DFDF -> 226 (from - to /)
OASDV-279/1016-FDFFD -> 279 (from - to /)
这是两条规则。(从开始到 /)或(从 - 到 /)