Replace what's within X and X - list. Help needed.
-
Hello okey this is what i need help with!
How do i replace for example:
[Object] Randomtext xxxx blablabla [/object]
[Object] Randomtext yyyy blablabla [/object]The only thing i want to change is the TEXT inside the [object] but with a list.
Etc a other list that have it like this:
Emma
DaveIt should be added and replaced with the
[Object] Randomtext xxxx blablabla [/object]
[Object] Randomtext yyyy blablabla [/object]
But only that xxxx becomes Emma and the yyyy becomes Dave.Thanks in advance!
-
Replace using a regex. Something like:
replace\([Object\]\sRandomtext\s)(xxxx)(.*?)(\[/object\])with$1Emma$3
and replace\([Object\]\sRandomtext\s)(yyyy)(.*?)(\[/object\])with$1Dave$3$4 -
Hello Jessica,
I suppose that the values Emma and Dave are part of a list of first names, aren’t they ?
Therefore, it would be interesting to extend this S/R regex to any number of first names, that are to be replaced !
So, could you tell us how you detect the xxxx and yyyy strings, inside a block
[object]....[/object]and could you provide an short example of your text, to illustrate the changes that are needed ? Thanks !Best Regards,
guy038
Hello! It looks like you're interested in this conversation, but you don't have an account yet.
Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.
With your input, this post could be even better 💗
Register Login