I have dynamic strings that sometimes will have a price in them and sometimes not. Its for craigslist so there is really no set format there can be commas, dashes, etc. Here are some examples of a typical string:
Xbox 360 (black) Elite Console 120GB (Mason City Illinois ) $200
$200 2013 North Trail Camper (RT 202. Manchester, Maine) $224/mo.
Snowmobile Bike trailers (Winthrop / Augusta) $40 Monthly
"Great Xmas Gift" XBox 360 Guitar Hero (Springfied) $80
I am trying to split up the string into title, location, and price. I can grab the location with:
Pattern p = Pattern.compile("\(([^]*)\)");
Matcher m = p.matcher(title);
Having trouble figuring out how to separate the title and price out. Any help would be appreciated.
To grab number after
$use:\$[0-9]+regex.