0

I am looking at translating guitar tabs into a string of digits!

so when I do a search and replace, its wrong... for example Line 1 a 5 is a "A" line 2 a 5 would mean "D"

My question is, How can I check the line number in a search and replace? this is the formula I would want to use

if the LineNumber is line 1,7,13 replace 1 with F

then I would run this for each different string... Thanks for any help! Justin

EDIT: File type I'm translating e---------------15-13- B--10-11-13----------- G--------------------- D--------------------- A--------------------- E---------------------

3
  • 1
    Could you copy paste part of the content of the file, and what you'd like it to look like after the replacement? I really don't get what you mean now.
    – m4573r
    Feb 9, 2015 at 14:19
  • Does the file allready contain inside the line numbers? If not i would gess you would need to add first of all line numbers to every line using search and replace and then running a search and replace to replace the number with ABCDF Feb 9, 2015 at 14:47
  • Adding something to the start is something I can do... as in replace those with numbers... (simple macro can do that...) but does anyone know how to only search and replace a line starting with a certain number?
    – antares330
    Feb 10, 2015 at 17:56

1 Answer 1

1

You don't need line numbers if your lines 1, 7 and 13 all start with signature e. In this case it is sufficient to identify the line.

You can get the result using search/replace with

  • Search mode = Regular Expressions
  • ". matches newline" = Off

Have a text:

e---------------15-13-
B--10-11-13-----------
G---------------------
D---------------------
A---------------------
E---------------------
e---------------15-13-
B--10-11-13-----------
G---------------------
D---------------------
A---------------------
E---------------------
e---------------15-13-
B--10-11-13-----------
G---------------------
D---------------------
A---------------------
E---------------------
  • Find what = ^(e.*)1
  • Replace with = \1F
  • Press Replace All multiple times until all replacements are made.
e---------------F5-F3-
B--10-11-13-----------
G---------------------
D---------------------
A---------------------
E---------------------
e---------------F5-F3-
B--10-11-13-----------
G---------------------
D---------------------
A---------------------
E---------------------
e---------------F5-F3-
B--10-11-13-----------
G---------------------
D---------------------
A---------------------
E---------------------

Repeat for other guitar strings and notes.

1
  • It works! I have tested it before posting. If you have any question, please let me know. If the answer was useful, please return here and mark it by check mark. (You can also upvote it, if it was really good.)
    – miroxlav
    Feb 16, 2015 at 19:15

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .