Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 11 of 11
  1. #1
    Senior Coder
    Join Date
    May 2006
    Posts
    1,683
    Thanks
    28
    Thanked 4 Times in 4 Posts

    Recommend a good find/replace tool?

    Not sure if this belongs in this section...

    I have about 100 php files in my site and I want to update all the
    places where I use: strip_tags(trim(
    with sql_safe(trim(
    so that my safer fuction can be used everywhere.

    I don't use dreamweaver so I was thinking - is there a tool that can do a find and replace on all the files in one directory ?

    I am sure most developers need this - so I guess there is a tool somewhere ?

    Anyone know where I can find one - preferably free

    Thanks
    Last edited by rmedek; 08-21-2006 at 10:51 PM. Reason: title
    If you want to attract and keep more clients, then offer great customer support.

    Support-Focus.com. automates the process and gives you a trust seal to place on your website.
    I recommend that you at least take the 30 day free trial.

  • #2
    Regular Coder
    Join Date
    Nov 2005
    Posts
    230
    Thanks
    1
    Thanked 0 Times in 0 Posts
    try finding some find and replace tool for this...
    i tried to use html search and replace
    you can try it for free.

  • #3
    Senior Coder
    Join Date
    Feb 2006
    Location
    USA
    Posts
    1,013
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Learn CSS. | SSI | PHP includes | X/HTML Validator | CSS validator | Dynamic Site Solutions
    Java != JavaScript && JScript != JavaScript
    Design/program for Firefox (and/or Opera), apply fixes for IE, not the other way around.

  • #4
    Senior Coder
    Join Date
    Nov 2003
    Location
    Minneapolis, MN
    Posts
    2,879
    Thanks
    2
    Thanked 65 Times in 56 Posts
    A decent text editor will do the job… I use "find in project…" a bunch in TextMate.

  • #5
    New to the CF scene
    Join Date
    Aug 2006
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Use Notepad+. That's what I use.

  • #6
    Senior Coder
    Join Date
    Jul 2005
    Location
    New York, NY
    Posts
    1,084
    Thanks
    4
    Thanked 19 Times in 19 Posts
    use sed

  • #7
    Senior Coder
    Join Date
    May 2006
    Posts
    1,683
    Thanks
    28
    Thanked 4 Times in 4 Posts
    Thanks for your replies.

    What is sed ?

    I tried to download jReplaceThem.
    from the link but the downloads links took me to

    Welcome to pokw.com which contained pages of stuff - couldn't find
    the jReplaceThem.
    If you want to attract and keep more clients, then offer great customer support.

    Support-Focus.com. automates the process and gives you a trust seal to place on your website.
    I recommend that you at least take the 30 day free trial.

  • #8
    Senior Coder
    Join Date
    Feb 2006
    Location
    USA
    Posts
    1,013
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Learn CSS. | SSI | PHP includes | X/HTML Validator | CSS validator | Dynamic Site Solutions
    Java != JavaScript && JScript != JavaScript
    Design/program for Firefox (and/or Opera), apply fixes for IE, not the other way around.

  • #9
    Senior Coder
    Join Date
    Jul 2005
    Location
    New York, NY
    Posts
    1,084
    Thanks
    4
    Thanked 19 Times in 19 Posts
    sed is the GNU stream editor tool. It allows you to manipulate ascii streams. Super powerful once you figure it out. The most common use is to apply regular expressions to every filename that matches a pattern in one simple shell command:

    sed -i -e {s/someIncludeFileName.php/newIncludeFile.php/g} *.php

    Now come on. How can any GUI tool compete with that!

  • #10
    Senior Coder
    Join Date
    Jan 2005
    Location
    Memphis, TN
    Posts
    1,788
    Thanks
    8
    Thanked 131 Times in 129 Posts
    I have a tag-a-long question with this.

    Anybody know of a program that can find and replace randomly? What Im talking about is some that does this:

    Find
    apple

    replace with
    peach
    watermelon
    orange
    cherry

    where when it replace the word apple it would either randomly insert one of the other 4 fruits or even just go down the list and repeat the process.
    Stop making things so hard on yourself.
    i is tugbucket :: help raise tugburg :: Whitehaven Kiwanis

  • #11
    Senior Coder
    Join Date
    Jul 2005
    Location
    New York, NY
    Posts
    1,084
    Thanks
    4
    Thanked 19 Times in 19 Posts
    no program, but you can write your own script for it, in any number of environments. You could use perl, or bash, or csh, or php. You could even write your own utility and compile it and distribute it.


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •