Win a copy of Programmer's Guide to Java SE 8 Oracle Certified Associate (OCA) this week in the OCAJP forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Pattern * and ?

 
Ananth Ram
Ranch Hand
Posts: 99
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Hi All,

I need to implement something like Pattern. I have a String value available. I need to make sure the pattern entered by the user matches the String value. Something
like the below



When user provides String Pattern = "jum*";

then the output should be starting from jump. ==> jumps over the lazy dog

Apart from the above pattern, the user can also enter a regex expression.

I need some pointers on where to start on implementing the same. Does the java.util. Regex/Pattern helps me.

Thanks for all help,

Thanks,
Ananth Ram
 
marc weber
Sheriff
Posts: 11343
Java Mac Safari
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
See Java Tutorials - Regular Expressions.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic