This week's book giveaway is in the OCMJEA forum. We're giving away four copies of OCM Java EE 6 Enterprise Architect Exam Guide and have Paul Allen & Joseph Bambara on-line! See this thread for details.
I am working on an application that will look through files and grab a string out of file that is bracketed by known special characters.
Example: XXX The sky is blue XXX
Needed Result: The sky is blue
I tried a replaceAll and the characters on the line previous to the special characters were not removed. I need to parse everything before and everything after to leave me with only what is in between.
Does anyone have an idea how to do this? I am using java 1.4
Originally posted by Edwin Dalorzo: [QB]But, your string may contain more than one token separated by this XXX, right?
XXX The sky is blue XXX The blood is red XXX The sun is yellow XXX
And the separator is XXX, right?
The seperator is anything unique that can be set within Ant code. The application runs Ant scripts. I am doing a echo and want to pick up entries not in all echos <echo> but within an echo and between any given special identifires that will not conflict with xml. I don't know if that makes sense. [ May 16, 2008: Message edited by: James Daniel ]
Find all matches. The content of the group is what you want to extract.
Can you tell us more about what you are trying to accomplish with this?
The soul is dyed the color of its thoughts. Think only on those things that are in line with your principles and can bear the light of day. The content of your character is your choice. Day by day, what you do is who you become. Your integrity is your destiny - it is the light that guides your way. - Heraclitus