6 Replies Latest reply on Sep 26, 2007 8:42 PM by 807605

    Replace all up to the first word character

      I have a String with a value of *1. Artist - Title*. What I am trying to do is remove everything up to the first word character so the new String will be Artist - Title. This is all I have been able to come up with:
      track.replaceAll ("\\d ^\w","").split (" - ");{code} Also, I used {code:java}track.replaceFirst ("\\d","").replaceFirst ("\\W","").replaceFirst ("\\s",""){code}but that isn't practical at all (even though it works).
      I tried to find examples on a few regular expression sites, but maybe I'm not searching with the right keywords. My code won't even compile. Anyone have a hint?