parenthesis around quotes - start of line/before attribution

parenthesis around quotes - start of line/before attribution

1
NewbieNewbie
1

    Feb 13, 2006#1

    I'm trying to accomplish something that may (perhaps) be impossible to do with a search/replace regexp....here goes...

    I have a quote file which has this format:
    this is a quote.--Quote Author

    I would (ideally) like to end up with this format:

    "this is a quote."--Quote Author

    in other words;
    at the beginning of the line insert parenthesis "
    after the period, and before the attribution dashes, insert another parenthesis "

    I've tried various approaches, and also read widely through this part of the forum, but haven't found any way to do this yet. Help would be greatly appreciated!!

    Regards & TIA
    Lobotomy
    (because only one half works)

    206
    MasterMaster
    206

      Feb 13, 2006#2

      You said insert parentheses, but you wrote quotation marks.

      Try thus Unix-style regex search/replace

      Search: ^(.+)[.]--(.*)$

      Replace: "\1."--\2


      substitute parens for quotes in the replace string if you like.

      read about tagged expressions in the regular expression section for more insight
      Software For Metalworking
      http://closetolerancesoftware.com

      344
      MasterMaster
      344

        Feb 13, 2006#3

        Hi guys

        In UNIX-STYLE (see your search-settings) try this:

        search
        ^([a-zA-Z].*)--
        replace with
        "\1"--

        rds Bego
        Normally using all newest english version incl. each hotfix. Win 10 64 bit