Jump to content

Adding two separate formats to same replace rule


Recommended Posts

I've got the first half of this rule working, but I can't seem to figure out the second and was hoping for some guidance.


I need to replace the registered trademark in a product name and then follow that up with italicizing the second half of the product name. So far I have:


return Field("ProductDescription").replace(/DENTtips Master/g, "DENTtips" + '<f name="Compatil Fact It"> Master</f>);


The registered mark needs to come right after "DENTtips" and before "Master". However, because the word "master" may be used in another grammatical context, I cannot force a global replace around "master" By itself. I tried the following which didn't work:


return Field ("ProductDescription").replace(/DENTtips® Motion | DENTtips® Motion/g, "DENTtips + '<superscript>®</superscript>' + '<f name=Compatil Fact It"> Master</f>);


I know I'm missing something easy here!!

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Create New...