Macro / replace (wildcards)

Joined
Aug 13, 2012
Messages
2
Reaction score
0
Hello,

I need some help with editing some text in word 2007. I have hundred of pages and after i finish these i will get other documents.
To work easier i have made some macros that helps me a lot, i can finish my work much faster.
But i have trouble with some replacements, i think it would be easier for me if i use regular expressions but i don't know how to use them. I documented on the internet for about 2 days and i decided i need some help with this because can't understand these in only a few days.

I need to macros for the next expressions:

"alin. 1", "alin. 2" ... "alin. 999" -> "alin. (1)", "alin. (2)" ... "alin. (999)"
"alin. 1,", "alin. 2," ... "alin. 999," -> "alin. (1),", "alin. (2)," ... "alin. (999),"
"alin.1", "alin.2" ... "alin.999" -> "alin. (1)", "alin. (2)" ... "alin. (999)" (there is no space between alin. and the number)

"lit. a", "lit. b" ... "lit. z" -> "lit. a)", "lit. b)" ... "lit. z)" (after the letter in some cases i have space in other cases i have a comma)
"lit.a", "lit.b" ... "lit.z" -> "lit. a)", "lit. b)" ... "lit. z)" (there is no space between lit. and the number)

"385/1" .. "385/20", "370/5", "170/22" -> "385<sup>1</sup>." .. "385<sup>20</sup>", "370<sup>5</sup>", "170<sup>22</sup>" (i need to replace /nr. to suprascript)
"ind.1" .. "ind.20", "ind.5", "ind.22" -> "<sup>1</sup>." .. "<sup>20</sup>", "<sup>5</sup>", "<sup>22</sup>" (i need to replace /nr. to suprascript)

": 1", ... ": 15", ": 99" -> ":1", ... ":15", ":99"

"/03 mai", "/15 mai", "/22 mai" -> "din 03 mai", "din 15 mai", "din 22 mai"


If i could find some regular expressions for these i would finish faster, because now i have to make to many macros and apply them, and also for some word alerts me that some macros have a procedure too long.


Please. if you can help with with some of these macros to make them more general and faster i would be very grateful.
If there is any way to apply regex to some of this replacements. ?!?
 
Last edited:
Joined
Aug 13, 2012
Messages
2
Reaction score
0
L.E.
for:
"lit. a", "lit. b" ... "lit. z" -> "lit. a)", "lit. b)" ... "lit. z)" (after the letter in some cases i have space in other cases i have a comma)
"lit.a", "lit.b" ... "lit.z" -> "lit. a)", "lit. b)" ... "lit. z)" (there is no space between lit. and the number)

i have found the answer, i use the next replacements:
1. "lit " -> "lit. "
2. "lit. ^$" -> "^&)"
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top