Win a copy of Think Java: How to Think Like a Computer Scientist this week in the Java in General forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Removing specific line from code

 
ron ray chaudhuri
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi All,

I am trying to write an Ant task for removing a specific method call from Javascript files.

I presume I would have to use Java for this, but since I'm having to use Jdk 1.3, I cannot use the java.util.regex for my purpose. Can anyone suggest, how I could actually achieve what I want to do?

Thanks in advance,
Ron
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 64830
86
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Since your question seems to be more about how to write the Java to do this rather than how to make the Ant task out of the Java, I'm moving this to the Java in General(intermediate) forum.
 
Ian Darwin
author
Ranch Hand
Posts: 64
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
In the First Edition of the Java Cookbook, I used one of the free Apache Regular Expression packages to explain regexes. I think any of these would work with Java 1.3. See jakarta.apache.org and look for either ORO or Regular Expressions.

Ian
 
ron ray chaudhuri
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
HI Ian,

Thanks for your response.

I'm really a novice with regexps. Coud you give some guidance in how to use the jakarta regexp package for my purposes?

Thanks in advance,
Ron
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic