regex - How do I replace the spaces between words in Emacs? -
i have files consisting of words:
ndkjsank ndjksandknsakj dnsjakndjskndjknsakjn dsajkndksnakjndsnajkndjkas dsnjak
and replace (sometimes multiple) spaces between them single tab:
dsnak**\t**ndsjka njdkas**\t**ndksjankda njdsaibdusai**\t**nkdsnakjdnas
is possible using regular expression in emacs? thought might away using rectangular selection area words of varying length (and file far long manually).
edit:
this comes close selects spaces/newlines/tabs right of second word:
\s-
the regexp want +
. call m-x replace-regex
replace +
\t
. note there's empty space before + sign.
also, produce tab might have hit c-qc-i keys. i'm not sure if accepts \t
syntax when called interactively.
Comments
Post a Comment