[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
RE: emacs for beginners (copy and paste)
From: |
Buchs, Kevin |
Subject: |
RE: emacs for beginners (copy and paste) |
Date: |
Fri, 12 Apr 2013 18:28:13 -0500 |
Welcome to emacs. You haven't said what you would like to do with the
values. One option might be that you want the numbers to be a list of
one number per line. Or, maybe you want the numbers with commas
separating them. In either of these cases, I would suggest you use a
couple of regular expression replacements to transform your given
contents. Position your cursor ("point") before the range. Then enter
M-x (usually that is Alt key held down while you press the x key),
followed by typing: replace-regexp. Press enter. Next you can type this
(carefully match it):
delta_ref: [0-9]+ delta_eff:
Note there is a trailing blank at the end of that line. Next press
enter. Again press enter. Now, repeat this in a similar fashion,
starting with M-x replace-regexp. Enter and
gamma_ref: [0-9]+ gamma_eff:
Note trailing blank. Press enter twice. Now, one more time, this being a
bit more complicated: M-x replace-regexp, enter and:
-+ MOUVEMENT M[0-9]+ -+
Then press Control-q followed by Control-j. Then continue to type:
alpha_ref: [0-9]+ alpha_eff:
Note there is a trailing blank at the end of that line. Now press enter
twice.
Now you should have something like:
11
04
00
15
00
01
...
If you make a mistake at some point, press Control-g to abort. Then you
can also press Control-x followed by Control-u to undo the last change.
Repeat C-x and C-u to undo further back.
Kevin Buchs | Senior Engineer | SPPDG | 507-538-5459 |
buchs.kevin@mayo.edu
Mayo Clinic | 200 First Street SW | Rochester, MN 55905 |
http://www.mayo.edu