• Post Reply Bookmark Topic Watch Topic
  • New Topic

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

 
pavithra murthy
Ranch Hand
Posts: 56
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 12617
IntelliJ IDE Ruby
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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?
 
Don't get me started about those stupid light bulbs.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!