File searcher and move a chunk of data

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • kredward
    New Member
    • Dec 2007
    • 2

    File searcher and move a chunk of data

    i need a script that will run thru a file and dir. for php files then look for a set 2 lines of code

    Code:
    <p class="terms"><a href="http://www.what.com/sub/info.html">terms of use</a></p>
    
      </div>
    it also has to ignore whitespace
  • eWish
    Recognized Expert Contributor
    • Jul 2007
    • 973

    #2
    This is a Perl Forum. Would you like for me to move this thread to the PHP forum? If not then please explain better what you are trying to achieve and show us the code that you have tried.

    --Kevin

    Comment

    • kredward
      New Member
      • Dec 2007
      • 2

      #3
      Originally posted by eWish
      This is a Perl Forum. Would you like for me to move this thread to the PHP forum? If not then please explain better what you are trying to achieve and show us the code that you have tried.

      --Kevin

      i was needing a script to look thru the PHP and find the above code and relocate it.

      only script language im proficent at these days is winbatch and it is doing some odd things.....

      Comment

      • eWish
        Recognized Expert Contributor
        • Jul 2007
        • 973

        #4
        Have a look at CPAN for an HTML Parser. After you write your script then post back here if you have troubles.

        Also, check out this sticky.


        --Kevin

        Comment

        • KevinADC
          Recognized Expert Specialist
          • Jan 2007
          • 4092

          #5
          Originally posted by kredward
          i need a script that will run thru a file and dir. for php files then look for a set 2 lines of code

          Code:
          <p class="terms"><a href="http://www.what.com/sub/info.html">terms of use</a></p>
          
            </div>
          it also has to ignore whitespace
          What have you tried so far?

          Comment

          Working...