question

TimothyTakemototimtak-6855 avatar image
0 Votes"
TimothyTakemototimtak-6855 asked TimothyTakemototimtak-6855 commented

Simple Regex Grouping Problem p100 > p. 100 find what p([0-9]) replace with p. /1

A student specifies pages incorrectly as p1 or p100 when in APA style it should be "p. 1" or "p. 100"
https://blog.apastyle.org/apastyle/2015/03/when-and-how-to-include-page-numbers-in-apa-style-citations.html


So I used
Find what: p([0-9]) in English, p followed immediately by a numeral in group (1)
Replace with: p. \1

The find works e.g. on p100 and finds the "p1" but when I replace the grouping is ignored and the result is
"p1. 00" not "p. 100" as I would like.

I also tried putting the p in its own group
Find what: (p)([0-9])
Replace with: p. \2
and
Replace with: \1. \2

but bothy of these likewise result in
"p1. 00" not "p. 100" as I would like.

There are a lot of these so I would be grateful of a solution.


office-word-itpro
· 2
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

I could not find any appropriate tags and had to specify a tag, sorry.

0 Votes 0 ·

This was in Word 2007 by the way.

0 Votes 0 ·
$$ANON_USER$$ avatar image
0 Votes"
$$ANON_USER$$ answered TimothyTakemototimtak-6855 commented

The problem is most likely due to having 'track changes' switched on.

· 1
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Thank you so much. That cured it, with still, 86 more items to replace.

0 Votes 0 ·
erinding-msft avatar image
0 Votes"
erinding-msft answered

Hi @TimothyTakemototimtak-6855

May you could try the following.

  • In Format, select Style, then set the style as below screenshot.

  • Replace "p" with "p. ".
    93895-image.png

By the way, please note: Office 2007 has reached the end of support on October 10, 2017, meaning there are no new security updates, non-security updates, free or paid assisted support options, or online technical content updates.
To get user experience of Office, it's recommended to upgrade to the most recent version of Office.


If an Answer is helpful, please click "Accept Answer" and upvote it.
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.


image.png (22.4 KiB)
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

TimothyTakemototimtak-6855 avatar image
0 Votes"
TimothyTakemototimtak-6855 answered TimothyTakemototimtak-6855 edited

Dear erinding-msft
Thank you for your answer.

However, I do not mean to refer to the page number of the manuscript but page numbers of citations.

Such as (made up)

My student writes

"the impartial spectator," (Smith, 1757, p450)

When my student should write
"the impartial spectator," (Smith, 1757, p. 450)

I find my Office 2007 to be better than the newer versions. I don't want to pay a Microsoft tax. I don't think software wears out over time. I don't need any more security than it provides. But I would like to know if this is a bug in Office 2007 or whether I am just writing the regex wrong.


5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.