Skip to main content

Notice

Please note that most of the software linked on this forum is likely to be safe to use. If you are unsure, feel free to ask in the relevant topics, or send a private message to an administrator or moderator. To help curb the problems of false positives, or in the event that you do find actual malware, you can contribute through the article linked here.
Topic: Another masstagger script issue. (Read 225 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

Another masstagger script issue.

I have been using Masstagger as a means to enforce case rules. But I have run into a small issue. Suppose I want to ensure that “CIA” is capitalized. I would use the pattern $replace(%title%,Cia,CIA). However, this also affects any other words(s) that start with those same letters. I’m wondering if there is a way to keep that from happening. Otherwise, I would have to use another pattern to reverse the action, e.g., $replace(%title%CIAo,Ciao). Is there some workaround that I haven’t discovered yet?

Hope y’all can understand what I’m trying to say.

 

Re: Another masstagger script issue.

Reply #1
Going off your example I'm guessing CIA is a singular word? In that case to avoid changing case of other words which have the same letters in it simply add a space character in your replace function.

Code: [Select]
$replace(%title%,Cia ,CIA , Cia , CIA )

One with a space trailing for when Cia is the start of a sentence and one with a space character before and after for when it's in the middle of a sentence. Like this words like "appreciation" will not get altered.

 
SimplePortal 1.0.0 RC1 © 2008-2021