开发者

How do I write a java pattern in this format: filepath (int, int) (int,int)?

开发者 https://www.devze.com 2023-02-07 09:10 出处:网络
For 开发者_开发问答example c:\\55.bmp(3,4) (45,7) I want to get the filepath which is c:\\55.bmp and the numbers 3, 4, 45 and 7.([A-z]:\\\\[^\\s]*)\\s\\((\\d*),(\\d*)\\)\\s\\((\\d*),(\\d*)\\)

For 开发者_开发问答example

c:\55.bmp  (3,4) (45,7)

I want to get the filepath which is c:\55.bmp and the numbers 3, 4, 45 and 7.


([A-z]:\\[^\s]*)\s\((\d*),(\d*)\)\s\((\d*),(\d*)\)

This pattern will match "c:\55.bmp (3,4) (45,7)" with subgroups:

$1 = C:\55.bmp
$2 = 3
$3 = 4
$4 = 45
$5 = 7
0

精彩评论

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