java regex pattern question# Java - 爪哇娇娃
c*t
1 楼
Given strings like this "........$1....$2...."
I want to get two arrays:
String[] for texts around $1, $2, etc ($[0-9]+, including $0).
and
String[] that just contain $1 $2 etc.
Any very quick ways of doing this? I could do string length
counting etc, but I am wondering if there are simpler ways.
Thanks.
I want to get two arrays:
String[] for texts around $1, $2, etc ($[0-9]+, including $0).
and
String[] that just contain $1 $2 etc.
Any very quick ways of doing this? I could do string length
counting etc, but I am wondering if there are simpler ways.
Thanks.