Can I find Outline Number, then read the entire line twice

Forum for info exchange on beta tests of new versions/features, and in-depth discussions of issues related to nextup products with Power Users. You must register with the forum system in order to have access to this section.

Moderators: kdwhite, Jim Bretti, D.Leikin

Can I find Outline Number, then read the entire line twice

Postby simo90 » Fri Nov 06, 2009 5:05 pm

I have a large document that has hundreds of paragraphs, but also has headers and subheaders that divide up these paragraphs. It looks like this.

1. This is my first header.
Then, under this first header will be one or more paragraphs . . .

A. Then I'll have a subhead
Again, I'll have 1 or more paragraphs . . .

What I would like to do is have TA find each header and read it twice. I did not know if there was a way for TA to say,
"Oh, I just found a header (i.e., W: {{re=\r\n\s*(\d+)\.\s*}} ),
I need to indicate this by saying, 'Next main point number 1 (i.e., P: next main point number $1 )"

But then I would like TA to read all the way to the next Carriage Return two times. Just to be clear, I want TA to say:
"Next main point number 1 This is my first header This is my first header"

Can I do this?

Brad
simo90
 
Posts: 8
Joined: Thu May 10, 2007 11:03 pm

Re: Can I find Outline Number, then read the entire line twice

Postby simo90 » Sun Nov 08, 2009 1:10 am

Well, after playing with it for a while, I answered my own question:

Word: \r\n\s*(\d+)\.([^\.]*)
Pronounce: Next main point $1 $2 again $2

\r\n -- Find a Carriage Return=\r and a New Line=\n

\s* -- Then find 0 or more spaces

(\d+) -- Then find one or more (+) digits (\d) and the ( ) indicate to save them in the variable $1.

([^\.]*) -- Then the ( ) says to save what's inside in variable $2. The [ ] says to look for any characters that are NOT=^ a period \. and the * says find 0 or more of them up to the first period.

So, $1 holds my outline number and $2 contains the outline words.

1) \r\n -- Find a Carriage Return=\r and a New Line=\n
2) \s* -- Then find 0 or more spaces
3) (\d+) -- Then find one or more (+) digits (\d) and the ( ) indicate to
save them in the variable $1.
4) ([^\.]*) -- Then the ( ) says to save what's inside in variable $2.
The [ ] says to look for any characters that are NOT=^
a period \. and the * says find 0 or more of them up to
the first period.
5) So, $1 holds my outline number and $2 contains the outline words.
simo90
 
Posts: 8
Joined: Thu May 10, 2007 11:03 pm


Return to Power Users, Beta Tests, In-Depth Discussions

Who is online

Users browsing this forum: No registered users and 0 guests