Help with escape sequence for s//

I need to write s// for Perl code, but the // is interpreted as beginning an italic sequence.
How to escape the // to get literal // chars?
Triple back-quote works if I am not inside a triple double-quote, but that's just where I wish to use //.

I’m using Debian V 10.13, FF 102.15 and TW 5.3.1

Hi Ron,
Welcome to the “club” :slight_smile:

Did you try to use inline-code formatting using single backticks? `s//`
See: https://tiddlywiki.com/#Formatting%20in%20WikiText

or

TW wikitext can use so-called pragmas which allow us to define wich elements should be interpreted.

So you can use

\rules except italic

s//

The names of the rules can be found at the ControlPanel → Info → Advanced → Parsing tab


They can be deactivated there globally in the Inline Parse Rules section.
Changes there need a wiki save and reload to be active.

Important: If you mess with global block rules, this can have side effects to the UI and can brick your wiki. So BACKUP - BACKUP - BACKUP

have fun!
Mario

I also did create a TW Wikitext Cheatsheet plugin, which can be activated with F1 in the editor.

See the intro thread here in the forum: [INTRO] TiddlyWiki Wikitext Cheatsheet

-mario

Thanx, but single and double escaped back-strokes inside back-ticks \/\/s; and \\/\\/s; render exactly the 6 or 8 chars enclosed.
Not what I want. This fails outside and inside triple-double quotes. Sigh.
I want the escape char to vanish leaving the escaped char only visible.

TW has no escape mechanism in wikitext we either use inline-code or the pragma rules, which are “active” inside 1 tiddler or globally.

The pragma rule \rules except italic at the beginning of a tiddler will do what you want.

Hi @RonSavage one way to be able to type //without triggering italic text is to use the HTML entity for the slash character which is /.

Ahhh. Nice. Take the rest of the day off. Tell your boss I said it was OK!

I use 4 single quotes together-

/''''/

Note that this works by creating an empty <strong></strong> (“bold”) HTML element between the two literal slash characters. Similarly, you can embed two single-quotes by separating them with four slashes, like this: '////'. This creates an empty <em></em> (“italics”) HTML element between the two literal single-quote characters.