• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

strings and regular expressions.

 
peter cooke
Ranch Hand
Posts: 317
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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="
 
Paul Clapham
Sheriff
Posts: 21117
32
Eclipse IDE Firefox Browser MySQL Database
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Yes, Java supports regular expressions.
 
Jeff Verdegan
Bartender
Posts: 6109
6
Android IntelliJ IDE Java
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic