Jump to content
Claris Engage 2025 - March 25-26 Austin Texas ×
The Claris Museum: The Vault of FileMaker Antiquities at Claris Engage 2025! ×

Substitute every Nth occurrence of a word match to a list for another word.


This topic is 4865 days old. Please don't post here. Open a new topic instead.

Recommended Posts

Posted

I'm not sure how to approach this. I see I can use patterncount to count on a single string, but not any (is valid?).

Within a given text string, I want to substitute "A" for every Nth occurrence of any whole word matching an item in list "B".

Example:

He walked to the store, checked his pocket and realizing he forgot his wallet, he groaned.

result

Bob walked to the store, checked his pocket and realizing he forgot his wallet, Bob groaned.

List in B, count any of:

He

he

his

His

A= Bob

Posted

I believe this will require a custom function.

every Nth occurrence of any whole word matching an item in list

What is N in your example? You are replacing the first and the fourth occurrence - that's already not consistent with "every Nth occurrence", whatever N may be.

This topic is 4865 days old. Please don't post here. Open a new topic instead.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.