Is it possible within BBEdit to do a Find getting text from one line and them 
do another find/replace to append the original found text to the second found 
line? I.e., can BBEdit hold found text for later use?

If not, then I need some Perl help. 

Within each file passed to the Perl script, I want to find the line beginning 
"movieYear : " and get the four digits following the space and before the line 
end character.


^movieYear : (\d{4})

I need to append a space and the four digits (within parentheses) to the end of 
the line beginning "title : "

So, if I call the Perl script:

/path/to/perl/script.pl /path/to/Phantom.txt /path/to/Kong.txt

and if the files passed to the script contain among their lines....



Phantom.txt
some text
More text
movieYear : 1925
additional lines of text
title : The Phantom of the Opera
more lines


Kong.txt
some text
More text
movieYear : 1933
additional lines of text
title : King Kong
more lines


I need the script to produce:


Phantom.txt
some text
More text
movieYear : 1925
additional lines of text
title : The Phantom of the Opera (1925)
more lines


Kong.txt
some text
More text
movieYear : 1933
additional lines of text
title : King Kong (1933)
more lines


Anyone care to lend a hand?


-- 
You received this message because you are subscribed to the 
"BBEdit Talk" discussion group on Google Groups.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
<http://groups.google.com/group/bbedit?hl=en>
If you have a feature request or would like to report a problem, 
please email "[email protected]" rather than posting to the group.
Follow @bbedit on Twitter: <http://www.twitter.com/bbedit>

Reply via email to