Results 1 to 5 of 5
  1. #1
    Roll Tide mobilebadboy's Avatar
    Join Date
    January 18th, 2005
    Location
    Mobile, Alabama
    Posts
    1,220
    Regular Expression Help
    Here's what I'm after:

    countpage("pc_puzzle.php","Puzzle Games");

    There's actually several lines of code, but this is the only line that will be different, the other lines are exactly the same on every page.

    I'm going to do a multiline search and replace and remove all of the code. So basically I need a regular expression to match anything inside of countpage();. Or anything I can do to that line to make it matchable.

    The code is included in over 200 pages so I prefer to not have to edit each one by hand. I've tried a couple of things with my limited R.E. knowledge but the program hit on nothing.

    Shawn Kerr (.com) | Disney World | SEC Football

  2. #2
    Roll Tide mobilebadboy's Avatar
    Join Date
    January 18th, 2005
    Location
    Mobile, Alabama
    Posts
    1,220
    By the way, the program I'm using for my search and replace uses the "TRegExpr library", if that helps anyone offer up a solution. This is a semi-urgent matter.

    Shawn Kerr (.com) | Disney World | SEC Football

  3. #3
    Moderator MichaelColey's Avatar
    Join Date
    January 18th, 2005
    Location
    Mansfield, TX
    Posts
    16,232
    You're probably having problems with the parenthesis, because they're special characters. Try using \( and \) instead.
    Michael Coley
    Amazing-Bargains.com
     Affiliate Tips | Merchant Best Practices | Affiliate Friendly? | Couponing | CPA Networks? | ABW Tips | Activating Affiliates
    "Education is the most powerful weapon which you can use to change the world." Nelson Mandela

  4. #4
    Newbie
    Join Date
    May 11th, 2005
    Posts
    8
    There is a useful program called "The regex coach" that allows you to step through and see exactly how your regex is matching or not to a test string. This is how I check and understand all regex issues now.

    www.weitz.de/regex-coach/.

  5. #5
    Roll Tide mobilebadboy's Avatar
    Join Date
    January 18th, 2005
    Location
    Mobile, Alabama
    Posts
    1,220
    I figured it out. I thought since the program could do Phrase and Multiline searches that I could do a Multiline RegEx search. It turns out I can't. So while it won't be as easy as I wanted it, it will still be easier than editing file by file.

    Shawn Kerr (.com) | Disney World | SEC Football

  6. Newsletter Signup

+ Reply to Thread

Similar Threads

  1. Regular Writing Assignments
    By Bestie711 in forum Newbie Affiliate FAQs & Helpful Articles
    Replies: 12
    Last Post: July 2nd, 2014, 10:03 AM
  2. No more FrontPage... SharePoint or Expression?
    By Eric Ewe in forum Midnight Cafe'
    Replies: 16
    Last Post: January 1st, 2008, 08:33 AM
  3. Expression Engine
    By Howard Gottlieb in forum Midnight Cafe'
    Replies: 4
    Last Post: August 9th, 2007, 07:09 PM
  4. eBay Reversals Regular
    By gkudasz in forum Commission Junction - CJ
    Replies: 2
    Last Post: January 26th, 2003, 12:12 PM

Posting Permissions

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