File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Regex (simple)

 
Justin Filmer
Greenhorn
Posts: 27
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Let's say I have this set of lines in a text file:


I need to pull out the array of strings so that the resulting output is:


Basically, I'm thinking I need to look for an equal sign, then ignore any number of whitespaces, find the max length of alaphanumeric text until hitting a ".$"
Any help would be appreciated! Thanks!
 
Rauhl Roy
Ranch Hand
Posts: 401
Spring
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
please provide as much code as possible
 
Justin Filmer
Greenhorn
Posts: 27
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Nevermind, it was much simpler than I thought...

I used the docs here to figure it out:
http://download.oracle.com/javase/tutorial/essential/regex/pre_char_classes.html

Thanks
 
Darryl Burke
Bartender
Posts: 5115
11
Java Netbeans IDE Opera
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Here's another good learning resource: http://www.regular-expressions.info/
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic