aspose file tools
The moose likes Java in General and the fly likes regular exression for concatenating  string in 2 different lines into the same line Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


JavaRanch » Java Forums » Java » Java in General
Reply Bookmark "regular exression for concatenating  string in 2 different lines into the same line " Watch "regular exression for concatenating  string in 2 different lines into the same line " New topic
Author

regular exression for concatenating string in 2 different lines into the same line

pavithra murthy
Ranch Hand

Joined: Feb 06, 2009
Posts: 53
hello ,

i have to extract the number present in the second line using regular expression . but am not able to do so tried with all type of regular expression using the search string as the first line since this was requirement given .
currently i am converting pdf to text and from this text i need to extract this number .
could anyone please help me out

the format in text file is like this below

Beleg-Nr.:
2001338138

but i am settingsearch string as beleg-nr....and then trying to extract next line which is not happening . Or is there a way out so that i can concatenate both and then extract the number from it


David Newton
Author
Rancher

Joined: Sep 29, 2008
Posts: 12617

If the items are on separate lines might it not be easier to just read each line and discard the ones you don't need?
 
I agree. Here's the link: http://ej-technologies/jprofiler - if it wasn't for jprofiler, we would need to run our stuff on 16 servers instead of 3.
 
subject: regular exression for concatenating string in 2 different lines into the same line
 
Similar Threads
how to extract search engine results
partial string extraction
string extraction by giving position as first argument in command prompt
HELP!
string extraction using regular expressions