I7 regexes: can we write caps in BOLD?

This is an odd test-case for regex, and I suspect there’s only so much Inform can practically handle. It would also save me a lot of code-fixing/fiddly stuff elsewhere if this were able to work.

It is this: if given a string, capital letters are all bolded. Only capital letters, no lower-case letters.

after reading a command:
	let T be indexed text;
	now T is "[the player's command]";
	replace the regular expression "(\u+)" in T with "[bold type]\1[roman type]";
	say "Output: [T].";
	now T is "tHiS is a TEST";
	replace the regular expression "(\u+)" in T with "[bold type]\1[roman type]";
	say "Output: [T].";

The code above compiles, but it doesn’t actually print the bold text out. Is there any way to apply bold?

The expected/hoped-for output is tHiS is a TEST.

When you start working with text variables on a letter-by-letter basis, you’ve flattened them to plain text strings. Function interpolations get resolved. “[bold type]” is a function interpolation and can’t be represented in plain text.