[TxMt] Re: How can I delete everything before a certain string...or a tab?
Hans-Jörg Bibiko
bibiko at eva.mpg.de
Wed Jul 15 06:32:01 UTC 2015
Hi, regular expressions will be your friend:
> For example, how can I strip away the names of the states in this string and only keep he two character abbreviations?
>
> (In my file the state names and abbreviations are separated by a tab.)
>
> Alabama AL
> Alaska AK
> Arizona AZ
> Arkansas AR
> California CA
search for:
^[^\t]*?\t
and replace by ""
and press "Replace All"
> Also...how could I turn this string:
>
> AL
> AK
> AZ
> AR
> CA
>
>
> into: AL¶AK¶AZ¶AR¶CA
search for:
\n
and replace by:
¶
and press "Replace All"
Best, Hans
More information about the textmate
mailing list