How do I write a java pattern in this format: filepath (int, int) (int,int)?
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
精彩评论