UPDATE:
@unlocked2412, @kevinb, and @Airy:
I appreciate your efforts, and I owe you an apology for wasting your time!
Since @Airy and I had different observations, I suspected there must be something unforeseen at work. So I copied the XML for the Search and Replace action and pasted it into BBEdit.
Look what I found! There is a newline after the %Variable%local_Pattern%
and before the </string>
.
With the newline removed the action is working as expected.
<dict>
<key>Action</key>
<string>CaseSensitiveRegEx</string>
<key>ActionUID</key>
<integer>16720755</integer>
<key>Destination</key>
<string>Variable</string>
<key>DestinationVariable</key>
<string>local_Text</string>
<key>MacroActionType</key>
<string>SearchReplace</string>
<key>Replace</key>
<string>-</string>
<key>Search</key>
<string>%Variable%local_Pattern%
</string>
<key>Source</key>
<string>Text</string>
<key>Text</key>
<string>.This sentence has two colons (::) and three slashes (///).</string>
<key>Which</key>
<string>All</string>
</dict>
Again, thanks for your help! This forum includes so many incredibly helpful users!