{assign name="_tpl_type" value="[_type]" /} {assign name="_tpl_name" value="[_name]" /} {assign name="_tpl_name_pre" value="[_name_pre]" /} {assign name="_tpl_allow_loop" value="[_allow_loop]" /} {php} $_tpl_is_process=($_tpl_name=='data-process')?true:false; $_tpl_name_id='c_p_'.str_replace(array('[',']'),'_',$_tpl_name).'_'.str_replace(array('[',']'),'_',$_tpl_name_pre); {/php} {if $_tpl_type=='rule'}
规则
{$Think.lang.sign_wildcard}
{:cp_sign('match')}
捕获组
正则

规则中无{:cp_sign('match')}标签时，自动将完全匹配的值保存为{:cp_sign('match')}标签以供拼接调用

拼接成最终内容
{:cp_sign('match','N')}
允许匹配多个结果
{if $_tpl_allow_loop}
{/if}
{elseif $_tpl_type=='xpath' /}
规则
属性
允许匹配多个结果
{if $_tpl_allow_loop}
{/if}
{elseif $_tpl_type=='json' /}
提取规则

直接输入键名，子节点用：a.b.c，通配符*

{if $_tpl_allow_loop}
匹配到多个结果允许循环入库
{/if}
结果是数组则转换为
{/if}