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

2991Re: [edit+] Re: Can we write multiple lines at the same time (with Macros)

Expand Messages
  • Dean Householder
    Oct 4, 2004
      There's not an easy way to capture these. The space is really the
      constant that I'm depending on to delimit each attribute. I looked into
      modifying it to look for either a > or another attribute with a value...
      but then it actually captures the name of the tag itself, which in this
      example is: "META".

      So no this would not work with spaces. You can look at this to be a
      great first stab at cleaning up your code but not an all-in-one
      solution. If EditPlus supported Perl regular expressions instead of
      just POSIX we would have a lot more power. There are some great options
      like look-ahead parameters that could be considered, but this is not
      currently allowed in EditPlus, unfortunately.

      Good luck,
      Dean Householder


      John Morse wrote:

      >Awesome! Thanks for sharing this with us. Works great for everything
      >that doesn't have a space in-between, how can you change it so that if
      >there is a space it will account for it as well?
      >for example:
      >The macro changes this:
      ><META NAME=Author CONTENT=John Morse>
      >To this:
      ><META NAME="Author" CONTENT="John" Morse>
      >When it should be this:
      ><META NAME="Author" CONTENT="John Morse">
      >I'm sure its just needs a slight change to the regular expression
      >string ( [a-z]+=)([a-z0-9#%]+) but i'm not sure what to add to it.
      >
      >Thanks again!!!
      >~John
      >"Oh Lord, give me patience. But give it to me RIGHT BLOODY NOW!"
      >
      >Friday, October 1, 2004, 12:15:21 PM, you wrote:
      >DH> Another of my favorite macros is one that adds quotes to all html tag
      >DH> values that are not quoted. For example, if you had:
      >DH> <table width=580 height=600>
      >DH> It would change it to:
      >DH> <table width="580" height="600">
      >DH> which is XHTML compliant.
      >
      >DH> The Macro to do this is:
      >DH> CTRL+h (Replace dialog)
      >DH> Replace:
      >DH> ( [a-z]+=)([a-z0-9#%]+)
      >DH> With:
      >DH> \1"\2"
      >
      >
      >
      >
      >http://www.editplus.com
      >http://groups.yahoo.com/group/editplus
      >Yahoo! Groups Links
      >
      >
      >
      >
      >
      >
      >


      [Non-text portions of this message have been removed]
    • Show all 14 messages in this topic