I made a mistake and now understand. profuse apologies.
The objective was to convert a markdown list to a structured text with headers.
thanks again and very sorry
Action 1 sets a string with 'asterisk-space-tab' in it with the tab typed on the keyboard, action 2 replaces 'asterisk-space-tab' with 'hash-hash-hash'.
Action 3 sets a string with 'asterisk-space-tab' in it with the tab entered as '\t', action 4 replaces 'asterisk-space-tab' with 'hash-hash-hash'.
Do you perhaps mean that "when defining a string variable you can enter a tab directly with the tab key or with \t"? Or am I, as usual, missing the point entirely!?
Are exactly equivalent, assuming the setting on the action is configured to process text tokens normally:
In both cases, the variable will have a TAB character in it.
And in both cases, the Search & Replace will process the \t as a tab as well, and so in both cases the replace will happen.
Note that if the Search & Replace is configured to be a regular expression instead of a plain text search, then Keyboard Maestro will not replace the \t with a TAB character however, instead the regular extension system will consider \t to match a TAB character. So the net behaviour is the same, but the reason for it is different.
See Text Fields for more information on token and slash processing.