php下正则来匹配dede模板标签的代码

html代码 复制代码 代码如下:

html代码
复制代码 代码如下:

{t:arc row=’10’} {t:field.title/} {t:list row=’5′} {t:field.title/}
{t:list row=’5′} {t:field.title/} {/t:list}{t:field.title/}
{/t:list}{t:field.title/} {/t:arc} {T:channelartlist row=’6′ }

{t:arc row=’10’}
{t:field.title/}
{t:list row=’5′}
{t:field.title/}
{t:list row=’5′}
{t:field.title/}
{/t:list}{t:field.title/}
{/t:list}{t:field.title/}
{/t:arc}
{T:channelartlist
row=’6′
}

{t:field name=’typename’/}{t:field.typename/}
{t:arclist titlelen=’42’ row=’10’}

{t:field name=’typename’/}{t:field.typename/}

  • [field:title/]
  • ([亚洲必赢76net的主页,field:sendtime function=”MyDate

{t:arclist titlelen=’42’ row=’10’}

{/t:arclist}

  • [field:title/]
  • ([field:sendtime function=”MyDate(‘m-d’,@me)”/])

{/t:channelartlist } {t:global.cfg_title
/}{t:var.cfg_title/}{t:global.cfg_webname
/}{t:global.cfg_title/}{t:var.cfg_title/} {t:field.title
function=”Html2Text”/} {t:include filename=”header.htm”/} {t:include
filename=”header.htm” /} {t:field.title function=’Html2Text’ }{/t:field
} {t:array name=’asdas’ }{/t:array } {t:channel typeid=’1′ row=’15’}
[field:id/][field:typename/] {/t:channel } {t:channel typeid=’1′}
[field:id/] [field:typename/]{/t:channel} {t:channel typeid=’1′
}[field:id/] [field:typename/]{/t:channel }sd
{t:channel}[field:typename/]{/t:channel } {t:channel typeid=’1′
row=’20’ }[field:userid/] [field:scores/] {/t:channel } php代码
复制代码 代码如下:

{/t:arclist}

“; print_r; echo “

{/t:channelartlist
}
{t:global.cfg_title
/}{t:var.cfg_title/}{t:global.cfg_webname
/}{t:global.cfg_title/}{t:var.cfg_title/}
{t:field.title function=”Html2Text(@me)”/}
{t:include
filename=”header.htm”/}
{t:include filename=”header.htm”
/}
{t:field.title function=’Html2Text(@me)’ }{/t:field
}
{t:array name=’asdas’ }{/t:array
}
{t:channel typeid=’1′ row=’15’}
[field:id/][field:typename/]
{/t:channel
}
{t:channel typeid=’1′} [field:id/] [field:typename/]{/t:channel}
{t:channel typeid=’1′ }[field:id/]
[field:typename/]{/t:channel
}sd
{t:channel}[field:typename/]{/t:channel
}
{t:channel typeid=’1′ row=’20’ }[field:userid/]
[field:scores/]
{/t:channel
}

“; ?> 输出内容: 复制代码 代码如下:
Array ( [0] => Array ( [str] => {t:arc row=’10’}
{t:field.title/} {t:list row=’5′} {t:field.title/} {t:list row=’5′}
{t:field.title/} {/t:list}{t:field.title/} {/t:list}{t:field.title/}
{/t:arc} [tagname] => arc [tagfield] => [text] =>
{t:field.title/} {t:list row=’5′} {t:field.title/} {t:list row=’5′}
{t:field.title/} {/t:list}{t:field.title/} {/t:list}{t:field.title/}
[attr] => Array [1] => Array ( [str] => {T:channelartlist
row=’6′ } {t:field name=’typename’/}{t:field.typename/} {t:arclist
titlelen=’42’ row=’10’} [field:title/] ([field:sendtime
function=”MyDate {/t:arclist} {/t:channelartlist } [tagname] =>
channelartlist [tagfield] => [text] => {t:field
name=’typename’/}{t:field.typename/} {t:arclist titlelen=’42’ row=’10’}
[field:title/] ([field:sendtime function=”MyDate {/t:arclist}
[attr] => Array [2] => Array ( [str] =>
{t:global.cfg_title /} [tagname] => global [tagfield] =>
cfg_title [text] => [attr] => Array [3] => Array (
[str] => {t:var.cfg_title/} [tagname] => var [tagfield]
=> cfg_title [text] => [attr] => Array [4] => Array (
[str] => {t:global.cfg_webname /} [tagname] => global
[tagfield] => cfg_webname [text] => [attr] => Array
[5] => Array ( [str] => {t:global.cfg_title/} [tagname]
=> global [tagfield] => cfg_title [text] => [attr] =>
Array [6] => Array ( [str] => {t:var.cfg_title/} [tagname]
=> var [tagfield] => cfg_title [text] => [attr] =>
Array [7] => Array ( [str] => {t:field.title
function=”Html2Text”/} [tagname] => field [tagfield] => title
[text] => [function] => Html2Text [attr] => Array [8]
=> Array ( [str] => {t:include filename=”header.htm”/}
[tagname] => include [tagfield] => [text] => [attr]
=> Array ( [filename] => header.htm ) ) [9] => Array (
[str] => {t:include filename=”header.htm” /} [tagname] =>
include [tagfield] => [text] => [attr] => Array (
[filename] => header.htm ) ) [10] => Array ( [str] =>
{t:field.title function=’Html2Text’ }{/t:field } [tagname] => field
[tagfield] => title [text] => [function] => Html2Text
[attr] => Array [11] => Array ( [str] => {t:array
name=’asdas’ }{/t:array } [tagname] => array [tagfield] =>
asdas [text] => [attr] => Array [12] => Array ( [str]
=> {t:channel typeid=’1′ row=’15’} [field:id/][field:typename/]
{/t:channel } [tagname] => channel [tagfield] => [text]
=> [field:id/][field:typename/] [attr] => Array ( [typeid]
=> 1 [row] => 15 ) ) [13] => Array ( [str] =>
{t:channel typeid=’1′} [field:id/] [field:typename/]{/t:channel}
[tagname] => channel [tagfield] => [text] =>
[field:id/] [field:typename/] [attr] => Array [14] =>
Array ( [str] => {t:channel typeid=’1′ }[field:id/]
[field:typename/]{/t:channel } [tagname] => channel [tagfield]
=> [text] => [field:id/] [field:typename/] [attr] =>
Array [15] => Array ( [str] =>
{t:channel}[field:typename/]{/t:channel } [tagname] => channel
[tagfield] => [text] => [field:typename/] [attr] =>
Array [16] => Array ( [str] => {t:channel typeid=’1′ row=’20’
}[field:userid/] [field:scores/] {/t:channel } [tagname] =>
channel [tagfield] => [text] => [field:userid/]
[field:scores/] [attr] => Array ( [typeid] => 1 [row]
=> 20 State of Qatar 卡塔尔(قطر‎ State of Qatar 测量试验代码打包下载

php代码
复制代码 代码如下:

发表评论

电子邮件地址不会被公开。 必填项已用*标注