## Finding a number followed by a paragraph mark

Expand Messages
• I am a beginner at using these expressions . I need to insert a tab after every telephone number that is followed by a paragraph mark. I propose to use the
Message 1 of 4 , Sep 24, 2008
• 0 Attachment
I am a beginner at using these 'expressions'.

I need to insert a tab after every telephone number that is followed
by a paragraph mark.

I propose to use the 'Replace' command.

In Help I found that

\d =ny decimal digit

Which I hoped would find the last number in a telephone number by using"

Find: \d^P

but nothing is found.

What should I be doing?

Many thanks,

Robin Chapple
• ... You got it but ^P becomes r n in regex. So it s this: d r n
Message 2 of 4 , Sep 24, 2008
• 0 Attachment
Robin Chapple wrote:
> I am a beginner at using these 'expressions'.
>
> I need to insert a tab after every telephone number that is followed
> by a paragraph mark.
>
> I propose to use the 'Replace' command.
>
> In Help I found that
>
> \d =ny decimal digit
>
> Which I hoped would find the last number in a telephone number by using"
>
> Find: \d^P
>
> but nothing is found.
>
> What should I be doing?
>
> Many thanks,
>
> Robin Chapple

You got it but ^P becomes \r\n in regex.

So it's this:
\d\r\n
• ... So this is my first venture with regex. I have read the help page on regular expressions and I am out of my depth. The expression d r n does find the
Message 3 of 4 , Sep 27, 2008
• 0 Attachment
At 25/09/2008 10:35 AM, Don - HtmlFixIt.com wrote:
>Robin Chapple wrote:
> > I am a beginner at using these 'expressions'.
> >
> > I need to insert a tab after every telephone number that is followed
> > by a paragraph mark.
> >
> > I propose to use the 'Replace' command.
> >
> > In Help I found that
> >
> > \d =ny decimal digit
> >
> > Which I hoped would find the last number in a telephone number by using"
> >
> > Find: \d^P
> >
> > but nothing is found.
> >
> > What should I be doing?
> >
> > Many thanks,
> >
> > Robin Chapple
>
>You got it but ^P becomes \r\n in regex.
>
>So it's this:
>\d\r\n

So this is my first venture with regex. I have read the help page on
regular expressions and I am out of my depth.

The expression \d\r\n does find the paragraph mark, but the replace
command takes the decimal digit as well.

How do I just replace the ^P with ^T if it follows a decimal digit?

Many thanks,

Robin Chapple
• The tab part of this ^T or t depending on regular or regex that you mention below is a new twist Robin. You didn t mention a tab before. In your top dialog
Message 4 of 4 , Sep 28, 2008
• 0 Attachment
The tab part of this ^T or \t depending on regular or regex that you
mention below is a new twist Robin. You didn't mention a tab before.

In your top dialog box put (\d)\r\n

By adding the parenthesis you have a found pattern that is assigned to a
variable sort of ...
then you can replace that variable (the number) back in by putting this
in the bottom box in the dialog:

\$1

the \$1 refers to the thing contained in the () above. If you had more
than one thing in parenthesis in that top find pattern then you would
have \$1, \$2, etc to put them back in if you want.

I by the way assume you are on the latest copy of notetab as regex has
improved a lot the past year or so.
>
> So this is my first venture with regex. I have read the help page on
> regular expressions and I am out of my depth.
>
> The expression \d\r\n does find the paragraph mark, but the replace
> command takes the decimal digit as well.
>
> How do I just replace the ^P with ^T if it follows a decimal digit?
>
> Many thanks,
>
> Robin Chapple
>
Your message has been successfully submitted and would be delivered to recipients shortly.