A friendly place for programming greenhorns!
Big Moose Saloon
Register / Login
Win a copy of
video training course this week in the
Java in General
Regular Expression in String
Joined: Jul 20, 2006
Aug 28, 2006 11:19:00
How regular expression
should look like to find the match in the string of word "amp". I want to use method String.matches(String regex).
Thank you in advance.
Joined: Jan 17, 2006
Aug 28, 2006 15:48:00
If you want the word amp (i.e. the regular expression doesnt match the amp in st
) the you would use:
boolean match = myString.matches("\\bamp\\b");
[ August 28, 2006: Message edited by: Garrett Rowe ]
Some problems are so complex that you have to be highly intelligent and well informed just to be undecided about them. - Laurence J. Peter
subject: Regular Expression in String
How can I add error handling facilities to this code?
to read lines inside brackets
Regular expression for valid xml
List to String
All times are in JavaRanch time: GMT-6 in summer, GMT-7 in winter
| Powered by
Copyright © 1998-2015