Are you sure that you are compiling with the 1.4 JDK?
--- "Kumar, Raj" <[EMAIL PROTECTED]> wrote:
>
> While running j2sdk1.4.1 version's regex APIs, I got the following error
> message:
>
> Code snippet:
>
> import java.io.*;
> import java.util.regex.*;
> import java.util.*;
>
> public class MyHTMLParser{
>
> public String trimPage(String page){
>
> String pageTrimmed;
>
> pageTrimmed=page.replaceAll("(\\s)body", "body");
> ..
>
> Java compilation command:
>
> C: javac MyHTMLParser.java
>
> Error message:
>
> MyHTMLParser.java:21: Method replaceAll(java.lang.String,
> java.lang.String) not
> found in class java.lang.String.
> pageTrimmed=page.replaceAll("(\\s)body", "body");
> ^
> 1 error
>
> Could anyone provide a clue as to what is wrong?
>
> Thanks,
> Raj
>
>
> To change your JDJList options, please visit:
http://www.sys-con.com/java/list.cfm
=====
James Amos Nathaniel Stauffer
Stauffer_James
@yahoo.com
Spam food: [EMAIL PROTECTED]
__________________________________________________
Do you Yahoo!?
Yahoo! News - Today's headlines
http://news.yahoo.com
To change your JDJList options, please visit: http://www.sys-con.com/java/list.cfm