• Post Reply Bookmark Topic Watch Topic
  • New Topic

Pattern with wildcards  RSS feed

 
nimo frey
Ranch Hand
Posts: 580
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello,

I want to use a regex in java.

How must the regex be, if I want to have all words with at least the word 'test12'.

So I need the pattern *test12* in java regex?
 
Jelle Klap
Bartender
Posts: 1952
7
Eclipse IDE Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What have you come up with so far and what problems are you're faced with?
If you're just getting started with regular expressions in Java, I'd suggest you have a look at the documentation of the java.util.regex.Pattern and java.util.regex.Matcher classes. The former in particular contains a lot of information about regex constructs.
 
Chinna Eranna
Ranch Hand
Posts: 174
Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Also.. a very good tutorial @

http://java.sun.com/docs/books/tutorial/essential/regex/
 
nimo frey
Ranch Hand
Posts: 580
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
okay thank found the solution there!

I was in doubt to use the operator '*'. but now it s clear.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!