Photo Mechanic > Code Replacements

Adding a team identifier

(1/3) > >>

G Man:
Is it possible to add a team identifier, (in this case) a "c" to an multiple entries?    In the image, (attached below) I have been adding the "c" individually.  It would be great if it is possible with a command where it will paste it in every row.    If you are wondering, the copy is where I get my rosters.  I copy it from a listing online, paste in notepad++. 



[attachment deleted by admin]

Hayo Baan:
I would do this on the command-line. If you have e.g., Perl installed something like this would add a c in front of every line:

perl -pi -E "s/^/c/" file
(the -i option does an in-place replacement, leave off the i to test your command.)

G Man:
Thank you.   But I was hoping for a solution a mere photographer could understand!   ???

Hayo Baan:
I understand ;)

Perhaps notepad++ allows you to record keyboard macros, this could then be a solution too.

Odd Skjaeveland:

--- Quote from: G Man on February 09, 2015, 06:45:08 AM ---But I was hoping for a solution a mere photographer could understand!

--- End quote ---

Your Notepad++ should support find/replace using regular expressions.

Open the file and then try

a) Menu-line->Search->Find...  (or press keys Ctrl+F)
b) Select the Replace pane in the pop up Find dialog
c) Set Search Mode to Regular Expression
d) Type a single cirumflex (^) in the Find What field
e) Type the c in the Replace With field
f) Click the Replace All button

The circumflex character ^ means "at line start" in regular expressions
If you want to remove the leading c character, set the Find What to ^c that literally spells line start and then c. Clear the Replace With field and do Replace All

--
Odd S.

Navigation

[0] Message Index

[#] Next page

Go to full version