Select text between quotes

Select text between quotes

2
NewbieNewbie
2

    Jul 21, 2011#1

    Could you please help with a macro which selects text between quotes ("|') (excluding quotes)?
    I've written a macro which selects text, but it includes the quotes.

    Thx

    6,605548
    Grand MasterGrand Master
    6,605548

      Jul 21, 2011#2

      A very quickly created version.

      InsertMode
      ColumnModeOff
      HexOff
      UnixReOff
      Find RegExp "["']"
      IfFound
      Find RegExp "[~"']+"
      EndIf

      That macro does not take escaped quotes into account. And the caret should never be set inside a string on execution.

      The Perl regular expression experts perhaps find better solutions than this simple approach with UltraEdit regular expression engine.

      BTW: If you need that macro only for selecting quickly a string, try double clicking with primary (left) mouse button while Ctrl key is pressed.

      2
      NewbieNewbie
      2

        Jul 21, 2011#3

        Works like a charm!
        Thank you very much.
        Mofi wrote:And the caret should never be set inside a string on execution.
        Modified your macro to select text if caret is inside a string.

        InsertMode
        ColumnModeOff
        HexOff
        UltraEditReOn
        Find RegExp Up "["']"
        IfFound
        Find RegExp "[~"']+"
        EndIf