X   Site Message
(Message will auto close in 2 seconds)

Welcome to UtterAccess! Please ( Login   or   Register )

Custom Search
   Reply to this topicStart new topic
> Advanced Search & Replace With Original Number Plus 1, Any Version    
post Jul 3 2019, 12:57 PM

Posts: 1,081
Joined: 18-February 04
From: Oklahoma

Is there a way to find a specific text followed by a number and then replace with the text and the number increased by 1?

i.e. I want to find the phrase "doc32" and replace it with "doc33", and replace "doc33" with "doc34", etc.

FYI the term is not at the end of the line and each instance is interspersed within other text.

Thanks you for your time considering this.
Go to the top of the page
post Jul 3 2019, 02:44 PM

UtterAccess VIP
Posts: 7,134
Joined: 30-June 11

Can you supply a couple real examples of phases and expected final results.

In the example you provided, are you wanting to find all instances of doc# and index the #? So you will know the textual component of the word and want to index all instances found? Is this for a selected region, the entire document?

Daniel Pineault (2010-2019 Microsoft MVP, UA VIP, EE Distinguished Expert 2018)
Professional Help: https://www.cardaconsultants.com
Free MS Access Code, Tips, Tricks and Samples: https://www.devhut.net

* Design should never say "Look at me". It should always say "Look at this". -- David Craib
* A user interface is like a joke, if you have to explain it, it's not that good! -- Martin LeBlanc

All code samples, demonstration databases, links,... are provided 'AS IS' and are to be used at your own risk! Take the necessary steps to check, validate ...(you are responsible for your choices and actions)
Go to the top of the page
post Jul 3 2019, 10:35 PM

Posts: 1,081
Joined: 18-February 04
From: Oklahoma

Thank you for replying, Daniel.

I have a text file that refers to over 100 images grouped into 65 documents (a probate file transcription and abstract]. I find that one of the images named "....doc32a.jpg" followed by "...doc32b.jpg" and "...doc32c.jpg" should be its own document by itself. "...doc32b.jpg" should be "...doc33a.jpg" and "...doc32c.jpg" should be "...doc33b.jpg". All the following file names should also be changed.

BTW, I refer to these file names in two other text files, so that would be a lot of manual changing. I've copied the information from "...doc32b.jpg" and down into a MS Word document. Hoping there is a way to do this a little more automatically with some type of search and replace like: search for "doc##" and replace with "doc##+1"

You asked for a sample.
Each image document info and transcription is preceded by "====="
Each image/page is preceded by "-----"
The abstract is preceded by "~~~~~"
So the info for image 32b looks like:

…[info for image 32a]
paper 2 & 3 [likely attached]
image 300 of 1820
Jones Seaborn probate 1863 MS MonroeCo pkt1205 doc32b.jpg
[Downloaded as Jones Seaborn probate 1863 MS MonroeCo pkt1205 doc065.jpg

Go to the top of the page

Custom Search

RSSSearch   Top   Lo-Fi    20th February 2020 - 07:47 PM