• Post Reply Bookmark Topic Watch Topic
  • New Topic

Finding Multiple patterns from a multiline text using regex  RSS feed

 
Prajwal Shetty
Ranch Hand
Posts: 36
Eclipse IDE Java Oracle
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I actually want to retrieve email,mobile no,website from a multiline string. I created patterns for them,but the problem is when i test the code for a multiline string, it always gives a mismatch. I tried using Pattern.MULTILINE but it has no effect. I want my application to find all the three details and store them into three different string variables. I also tried using the find() and group() method.
 
Wouter Oet
Bartender
Posts: 2700
IntelliJ IDE Opera
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I think we're going to need to see some code. Did you try the regex's individually?
 
Prajwal Shetty
Ranch Hand
Posts: 36
Eclipse IDE Java Oracle
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Got my problem solved Was using ^ and $ which actually caused problems. Thanks for the comment though...
 
Don't get me started about those stupid light bulbs.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!