Click here to Skip to main content
15,904,024 members
Home / Discussions / Java
   

Java

 
AnswerRe: Brand New to Java Pin
Alok Sharma ji21-Nov-10 23:09
Alok Sharma ji21-Nov-10 23:09 
QuestionMessage Removed Pin
20-Nov-10 7:12
mr_plow9920-Nov-10 7:12 
AnswerRe: Help with essentially searching text Pin
Dr.Walt Fair, PE20-Nov-10 12:46
professionalDr.Walt Fair, PE20-Nov-10 12:46 
GeneralMessage Removed Pin
22-Nov-10 5:55
mr_plow9922-Nov-10 5:55 
GeneralRe: Help with essentially searching text Pin
Dr.Walt Fair, PE22-Nov-10 8:08
professionalDr.Walt Fair, PE22-Nov-10 8:08 
GeneralRe: Help with essentially searching text Pin
David Skelly23-Nov-10 1:53
David Skelly23-Nov-10 1:53 
GeneralMessage Removed Pin
23-Nov-10 9:01
mr_plow9923-Nov-10 9:01 
GeneralRe: Help with essentially searching text Pin
David Skelly23-Nov-10 21:51
David Skelly23-Nov-10 21:51 
Boundary matchers:

http://download.oracle.com/javase/tutorial/essential/regex/bounds.html[^]

In order to make sense of it you will also need to look at the test harness:

http://download.oracle.com/javase/tutorial/essential/regex/test_harness.html[^]

If it was me, I would probably go for a simpler solution if you need to count the number of replacements as well.

Use split to split the string into an array of words. Then iterate over the list of words, checking each in turn and concatenating back into a new string. Check each word as you do it, and replace the ones that match, keeping count as you go.

http://blog.codebeach.com/2008/03/split-string-into-words-in-java.html[^]
QuestionJava Chronometer Pin
Smaini Nurbs17-Nov-10 16:58
Smaini Nurbs17-Nov-10 16:58 
AnswerRe: Java Chronometer Pin
Richard MacCutchan18-Nov-10 1:40
mveRichard MacCutchan18-Nov-10 1:40 
GeneralRe: Java Chronometer Pin
Smaini Nurbs18-Nov-10 16:35
Smaini Nurbs18-Nov-10 16:35 
GeneralRe: Java Chronometer Pin
Nagy Vilmos18-Nov-10 21:47
professionalNagy Vilmos18-Nov-10 21:47 
GeneralRe: Java Chronometer Pin
David Skelly18-Nov-10 22:13
David Skelly18-Nov-10 22:13 
GeneralRe: Java Chronometer Pin
David Skelly18-Nov-10 22:16
David Skelly18-Nov-10 22:16 
GeneralRe: Java Chronometer Pin
Richard MacCutchan18-Nov-10 22:52
mveRichard MacCutchan18-Nov-10 22:52 
QuestionCall Class Pin
Smaini Nurbs13-Nov-10 0:58
Smaini Nurbs13-Nov-10 0:58 
AnswerRe: Call Class Pin
Smaini Nurbs13-Nov-10 1:02
Smaini Nurbs13-Nov-10 1:02 
GeneralRe: Call Class Pin
David Skelly16-Nov-10 22:27
David Skelly16-Nov-10 22:27 
GeneralRe: Call Class Pin
Smaini Nurbs17-Nov-10 16:55
Smaini Nurbs17-Nov-10 16:55 
GeneralRe: Call Class Pin
David Skelly17-Nov-10 22:15
David Skelly17-Nov-10 22:15 
GeneralRe: Call Class Pin
Smaini Nurbs18-Nov-10 16:35
Smaini Nurbs18-Nov-10 16:35 
AnswerRe: Call Class Pin
TorstenH.13-Nov-10 4:59
TorstenH.13-Nov-10 4:59 
GeneralRe: Call Class Pin
Smaini Nurbs13-Nov-10 18:27
Smaini Nurbs13-Nov-10 18:27 
GeneralRe: Call Class Pin
TorstenH.13-Nov-10 21:09
TorstenH.13-Nov-10 21:09 
GeneralRe: Call Class Pin
Smaini Nurbs13-Nov-10 22:36
Smaini Nurbs13-Nov-10 22:36 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.