Qurak

Highlight words of a given length

Exemplo 2 passos, executados em ordem numa sessão. Cada passo foi executado no motor e a saída abaixo é o que ele produziu.

Passo 1
text = StringTake[ExampleData[{"Text", "AliceInWonderland"}], 400]
Saída
StringTake[ExampleData[{Text, AliceInWonderland}], 400]
Passo 2
Manipulate[TextCell[Row[List@@StringReplace[text, {RegularExpression["\\b\\w{" <> ToString[u] <> "}\\b"] :> Style["$0", 18, Bold]}]], "TR"], {u, 1, 10, 1}, SaveDefinitions -> True]
Saída
Manipulate[TextCell[Row[List @@ StringReplace[text, {RegularExpression[StringJoin["\\b\\w{", ToString[u], "}\\b"]] :> Style["$0", 18, Bold]}]], TR], {u, 1, 10, 1}, SaveDefinitions -> True]

Funções usadas

Receitas relacionadas

Todas as receitas · Referência de funções · Usar isto de um cliente MCP