Highlight Words of a Given Length
Highlight Words of a Given Length
Use RegularExpression for processing textual data.
text = StringTake[ExampleData[{"Text", "AliceInWonderland"}], 400]Manipulate[TextCell[Row[List@@StringReplace[text, {RegularExpression["\\b\\w{" <> ToString[u] <> "}\\b"] :> Style["$0", 18, Bold]}]], "TR"], {u, 1, 10, 1}, SaveDefinitions -> True]