This week's book giveaway is in the OO, Patterns, UML and Refactoring forum. We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma on-line! See this thread for details.
I have a problem with regex as I have a user who is supposed to input a number of characters which are a combination of '.' and '*'. To start I don't know how to use the '.' as a character . My string is
String regex = ".*" ;
which of course is translated into zero or many any possible character. I hope you ranchers could help me with this as I'm googling for answers right now and I can find relevant articles.
Joined: Aug 23, 2009
Ok guys I found out that to use . or * as ordinary literals you have to put them between square brackets [.][*] like that,
now I need to find out how to make the user enter a line of 5 characters that is formed from a combination of . and *