我定义了一个字符串类型的参数。% set my_argument = 'list_from_gae' %}{% for i in my_argument %}
my_argument的字符串文本对应于从python应用程序传递的列表。上面的代码不起作用,但是如果我用字符串文本替换for循环中的my_argument,
我有一个字符串,例如:
"The red letters in the following words are suffixes: beauti*ful*, speech*less* and invinc我想用<span class='red'>替换每个**对中的第一个,用</span>替换第二个。我可以在for循环中做到这一点,但我想知道如何使用RegExp来做到这一点。