Am 15.04.2010 12:16, schrieb epanda:
Hi,I need to use a pattern to detect some field in lines : The pattern is that one : let pattern = '"{\"\\(\\w\\+\\)\"\\s\\+,\\(\\d\\+\\)\\s\\+,\\d\\+\\s\\ +,\\(\\w\\+\\)\\s\\+,\\(\\w\\+\\)\\s\\+,.*\\{,\\d\\+\\s\\+}.*$"' call map(myList,'substitute(v:val, ' . pattern . ', "<item>\\n<reference>\\2</reference>\\n<type>\\4</type>\ \n<valeur>0</valeur>\\n<description>\\1</description>\\n</item>", "")') 1/ I would like avoiding to put double backslash in order the pattern works under double call map( and substitute( funcs.
Use single quotes which can be escaped by doubling them: :echo 'abc''de\f' The string() function does this for you. -- Andy -- You received this message from the "vim_use" maillist. Do not top-post! Type your reply below the text you are replying to. For more information, visit http://www.vim.org/maillist.php To unsubscribe, reply using "remove me" as the subject.
