[TxMt] regex question
Oliver Taylor
oliver at ollieman.net
Wed Feb 22 08:08:35 UTC 2006
So, to restate my question in a more clear way... (thanks for your
patience Haris) I know nothing about programming...
I'm trying to run a perl search/replace command via a 'bundle
command'. I've entered the following into the 'Edit Command' box:
perl -pe '
s/^([A-Z]+.*[A-Z]*\s*)\n(\(.+\))\n(.+)$/\n\n\t\t\t\t$1\n\t\t\t$2\n\n
$3/g;
'
I've set the input to 'Entire Document' and the output to 'Create New
Document'.
But when I run the command none of the tabs or newlines I've
specified in the replace section of the command are applied to the
text in question. I've also tried the command with the 'e' option at
the end which, as far as I can tell, is supposed to evaluate the
right side of the search/replace command as regex... but it's not
working.
Any help is appreciated.
Just so you know, I'm trying to write a set of commands that will
transform the plai-text output from Final Draft when exporting a
screenplay. If I can get this working then I can bring all my scripts
over to TextMate.
As an example, this:
-----------------
OLIVER
(I want to tell you)
I've got things to say.
Dr. Robert
-----------------
should look like this:
---------------------------
OLIVER
(I want to tell you)
I've got things to say.
Dr. Robert
---------------------------
More information about the textmate
mailing list