Win a copy of Kotlin in Action this week in the Kotlin forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

using regular expressions to do case insensitive matches  RSS feed

 
Jonathan Miltner
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi
i am somewhat new to using regex in java and i can't seem to figure the following problem out:

i have 2 files that I am trying to process....

File 1 contains long lines of text with first and last names and various other stuff

File 2 contains tab separated info in the following order:
LastName FirstName Email

so for example i have:

line in file 1 reads:
1003JonMiltnerConfused

then in file 2 i have something like
miltnerjon jon@whatever.com

------------- below is my current process:

system reads info from file 2
creates pattern from last name:


So how would i expand this to do the reg-ex matching without being sensitive to case ?

thanks so much, i havent been able to find any docs on the web that explain this....


- jon
 
Jonathan Miltner
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
ok nevermind
i checked the api docs one last time
i guess i should just set the CASE_INSENSITIVE flag when making the pattern...
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!