Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 03-07-2019, 03:28 PM
macropod's Avatar
macropod macropod is offline Regex over 700 matches in a long doc Windows 7 64bit Regex over 700 matches in a long doc Office 2010 32bit
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 22,467
macropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond repute
Default


The Find expression is having issues with strings like ([ABC]). It's fine with strings like ([ABC]x), however. Change the Find expression to:
.Text = "\(\[[!\(\[]@\]*\)"
and the code should run to completion in less than 1 minute.
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote
  #2  
Old 03-08-2019, 03:20 AM
totoMSOF totoMSOF is offline Regex over 700 matches in a long doc Windows 7 64bit Regex over 700 matches in a long doc Office 2010
Novice
Regex over 700 matches in a long doc
 
Join Date: Mar 2019
Posts: 11
totoMSOF is on a distinguished road
Default

Indeed: it works! Thank you for this code.

This is the first part of the job: in fact, I don't want to copy the reference as they appear but I use a dictionnary to put complete reference in the footnotes; this is not complicated, but the thing is that I must format the reference inside the footnote...

I've started to work on that, but before continuing, I am going to keep on looking for the portion of code that doesn't work, in order to understant better VBA, and to study the .Find method.

If anyone can help for that, by providing sources, sites, books reference or answering questions...

In any case, I acknowledge participants for their help!
Reply With Quote
  #3  
Old 03-08-2019, 04:17 AM
macropod's Avatar
macropod macropod is offline Regex over 700 matches in a long doc Windows 7 64bit Regex over 700 matches in a long doc Office 2010 32bit
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 22,467
macropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond repute
Default

Quote:
Originally Posted by totoMSOF View Post
I don't want to copy the reference as they appear but I use a dictionnary to put complete reference in the footnotes; this is not complicated, but the thing is that I must format the reference inside the footnote...
It would have been helpful if you said from the outset what it is you want to achieve. Without knowing where these references comes from or how you want them to be formatted, it's impossible to progress the matter.

Quote:
Originally Posted by totoMSOF View Post
I am going to keep on looking for the portion of code that doesn't work
Given that your opening statements was "Indeed: it works!", I have no idea what you mean by "the portion of code that doesn't work".
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote
Reply

Tags
regex, replace



Similar Threads
Thread Thread Starter Forum Replies Last Post
Regex over 700 matches in a long doc Using VB Regex feature, I tried to replace 'the' and 'this' with 'that' but got screwed abdan Word VBA 3 01-18-2019 09:38 PM
How to compare 2 Excel sheets for 100+ matches? dylansmith Excel 5 05-22-2017 09:09 PM
Macro help regex subspace3 Word VBA 1 10-15-2014 09:53 AM
Regex over 700 matches in a long doc Convert RegEx to Word (Devanagari Font Find/Replace) gasyoun Word VBA 9 04-12-2013 04:15 PM
Regex in Word: Replaced strings are in disorder chgeiselmann Word 0 04-26-2009 11:33 AM

Other Forums: Access Forums

All times are GMT -7. The time now is 06:59 AM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2025, vBulletin Solutions Inc.
Search Engine Optimisation provided by DragonByte SEO (Lite) - vBulletin Mods & Addons Copyright © 2025 DragonByte Technologies Ltd.
MSOfficeForums.com is not affiliated with Microsoft