Loading ...
Sorry, an error occurred while loading the content.

Regular Expression Help

Expand Messages
  • bizshop1
    I m trying to use the regular expression function and have spent the last * hours trying different combos, searching the web, etc. I have lines similar to:
    Message 1 of 7 , Sep 1, 2003
    • 0 Attachment
      I'm trying to use the regular expression function and have spent the
      last * hours trying different combos, searching the web, etc.

      I have lines similar to:

      include("masthead.php");
      blueFont("Arial","How many additional copies of \"$title\" do you
      want?");

      I'm shifting to CSS and want to change second line to

      include("masthead.php");
      echo "How many additional copies of \"$title\" do you want?";

      The enclosed $ or \" are causing me fits....
    • John Zeman
      If you have the first section of text selected with the RegExp option previously enabled in the Replace dialog box, the Replace dialog will escape certain
      Message 2 of 7 , Sep 1, 2003
      • 0 Attachment
        If you have the first section of text selected with the RegExp option
        previously enabled in the Replace dialog box, the Replace dialog will
        escape certain characters effectively changing \"$title\" into
        \\"\$title\\" is that what you are referring to?

        If so, try unchecking the RegExp option first, then enabling it after
        you have the text entered.

        John


        --- In notetab@yahoogroups.com, "bizshop1" <steve@b...> wrote:
        > I'm trying to use the regular expression function and have spent
        the
        > last * hours trying different combos, searching the web, etc.
        >
        > I have lines similar to:
        >
        > include("masthead.php");
        > blueFont("Arial","How many additional copies of \"$title\" do you
        > want?");
        >
        > I'm shifting to CSS and want to change second line to
        >
        > include("masthead.php");
        > echo "How many additional copies of \"$title\" do you want?";
        >
        > The enclosed $ or \" are causing me fits....
      • Alec Burgess
        Bishop Greg s advice about allowing Notetab to help by auto-converting to handle some of the characters that need to be escaped should help. For your specific
        Message 3 of 7 , Sep 1, 2003
        • 0 Attachment
          Bishop

          Greg's advice about allowing Notetab to help by auto-converting to handle
          some of the characters that need to be escaped should help.

          For your specific example (w/o the "=="):

          RegExp: ==blueFont\("Arial",{".*}\);\s*$==
          Replace: ==echo "\1==

          Note: the \s* on the end is in case you have trailing spaces

          It may be possible to do it more generally than this, but you might be
          getting trapped by the " at the end of the font name and the " in \"title\".
          Notetab's current rage is greedy to if you have any sort of a wildcard
          before a " it will run all the way to the last one.

          If there are several fonts that are all to get reduced to an "echo",
          something like this might work:
          (("Arial")|("Helvetica")|("anyotherFONT")) in place of the specific "Arial"
          though I confess that I wasn't able to get this one to work - probably some
          silly typo I'm missing.

          the \s* at the end is in case there are trailing spaces.

          If you do need the more general case, post back with 5 or 6 examples of what
          you're starting with, and what you need to end up with.

          Regards ... Alec
          --

          ---- Original Message ----
          From: "bizshop1" <steve@...>
          To: <notetab@yahoogroups.com>
          Sent: Monday, September 01, 2003 07:10
          Subject: [mla: [NTB] Regular Expression Help

          > I'm trying to use the regular expression function and have spent the
          > last * hours trying different combos, searching the web, etc.
          >
          > I have lines similar to:
          >
          > include("masthead.php");
          > blueFont("Arial","How many additional copies of \"$title\" do you
          > want?");
          >
          > I'm shifting to CSS and want to change second line to
          >
          > include("masthead.php");
          > echo "How many additional copies of \"$title\" do you want?";
          >
          > The enclosed $ or \" are causing me fits....
          >
          >
          >
          >
          >
          >
          > ------------------------ Yahoo! Groups Sponsor
          >
          > To unsubscribe click on address below and send the message empty:
          > mailto:notetab-unsubscribe@yahoogroups.com
          > http://groups.yahoo.com/list/notetab
          >
          > Your use of Yahoo! Groups is subject to
          > http://docs.yahoo.com/info/terms/
        • james.homme@highmark.com
          Hi, Why won t an exact replace work? Thanks. Jim bizshop1 cc: Subject:
          Message 4 of 7 , Sep 2, 2003
          • 0 Attachment
            Hi,
            Why won't an exact replace work?

            Thanks.

            Jim




            "bizshop1"
            <steve@... To: notetab@yahoogroups.com
            m> cc:
            Subject: [NTB] Regular Expression Help
            09/01/2003 07:10
            AM
            Please respond to
            notetab






            I'm trying to use the regular expression function and have spent the
            last * hours trying different combos, searching the web, etc.

            I have lines similar to:

            include("masthead.php");
            blueFont("Arial","How many additional copies of \"$title\" do you
            want?");

            I'm shifting to CSS and want to change second line to

            include("masthead.php");
            echo "How many additional copies of \"$title\" do you want?";

            The enclosed $ or \" are causing me fits....






            Yahoo! Groups Sponsor








            To unsubscribe click on address below and send the message empty:
            mailto:notetab-unsubscribe@yahoogroups.com
            http://groups.yahoo.com/list/notetab

            Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.
          Your message has been successfully submitted and would be delivered to recipients shortly.