| Author |
strings and regular expressions.
|
peter cooke
Ranch Hand
Joined: Mar 16, 2004
Posts: 310
|
|
I am given the the following string that I need to process.
frame= 71 fps= 0 q=32.0 size= 12kB time=1.93 bitrate= 50.2kbits/s dup=0 drop=69
I need to grab the text after "time=" In perl I remember being able to easily grab the word or words after the matched pattern.
Does Java support such a feature?
If I split the stirng, "time=XXXX" does not consistantly appear in the same position in the string array. There has to be some simple way extract the word that follows "time="
|
CIAO Peter M. Cooke
|
 |
Paul Clapham
Bartender
Joined: Oct 14, 2005
Posts: 16483
|
|
|
Yes, Java supports regular expressions.
|
 |
Jeff Verdegan
Bartender
Joined: Jan 03, 2004
Posts: 5844
|
|
String.split()
String.replaceAll()
java.util.regex.Pattern
java.util.regex.Matcher
|
 |
 |
|
|
subject: strings and regular expressions.
|
|
|