MorFologist Posted September 25, 2011 Posted September 25, 2011 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
comment Posted September 25, 2011 Posted September 25, 2011 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.
MorFologist Posted September 25, 2011 Author Posted September 25, 2011 Yes, planning to be a CF. "First" could be handled separately so not important.
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now