回复 1# zsltxx
#include <Array.au3>
Local $Str = _
'<smil>' & @CRLF & _
' <head>' & @CRLF & _
' <layout>' & @CRLF & _
' <root-layout width="176" height="208"/>' & @CRLF & _
' <region id="Image" width="56%" height="24%" left="0%" top="0%"/>' & @CRLF & _
' <region id="Text" width="56%" height="24%" left="0%" top="24%"/>' & @CRLF & _
' </layout>' & @CRLF & _
' </head>' & @CRLF & _
' <body>' & @CRLF & _
' <par dur="180000ms">' & @CRLF & _
' <text src="TxT_19430.txt" region="Text"/>' & @CRLF & _
' <img src="att000.jpg" region="Image"/>' & @CRLF & _
' </par>' & @CRLF & _
' <par dur="180000ms">' & @CRLF & _
' <text src="TxT_18864.txt" region="Text"/>' & @CRLF & _
' </par>' & @CRLF & _
' <par dur="180000ms">' & @CRLF & _
' <text src="TxT_29443.txt" region="Text"/>' & @CRLF & _
' </par>' & @CRLF & _
' <par dur="180000ms">' & @CRLF & _
' <text src="TxT_21602.txt" region="Text"/>' & @CRLF & _
' </par>' & @CRLF & _
' <par dur="180000ms">' & @CRLF & _
' <text src="TxT_2030.txt" region="Text"/>' & @CRLF & _
' </par>' & @CRLF & _
' <par dur="10000ms">' & @CRLF & _
' <img src="att060.jpg" region="Image"/>' & @CRLF & _
' </par>' & @CRLF & _
' <par dur="180000ms">' & @CRLF & _
' <text src="TxT_22339.txt" region="Text"/>' & @CRLF & _
' </par>' & @CRLF & _
' <par dur="180000ms">' & @CRLF & _
' <text src="TxT_6280.txt" region="Text"/>' & @CRLF & _
' </par>' & @CRLF & _
' <par dur="180000ms">' & @CRLF & _
' <text src="TxT_16223.txt" region="Text"/>' & @CRLF & _
' </par>' & @CRLF & _
' <par dur="10000ms">' & @CRLF & _
' <img src="att100.jpg" region="Image"/>' & @CRLF & _
' </par>' & @CRLF & _
' <par dur="180000ms">' & @CRLF & _
' <text src="TxT_24982.txt" region="Text"/>' & @CRLF & _
' </par>' & @CRLF & _
' <par dur="10000ms">' & @CRLF & _
' <img src="att120.jpg" region="Image"/>' & @CRLF & _
' </par>' & @CRLF & _
' <par dur="180000ms">' & @CRLF & _
' <text src="TxT_29351.txt" region="Text"/>' & @CRLF & _
' </par>' & @CRLF & _
' <par dur="180000ms">' & @CRLF & _
' <text src="TxT_25734.txt" region="Text"/>' & @CRLF & _
' </par>' & @CRLF & _
' <par dur="180000ms">' & @CRLF & _
' <text src="TxT_15145.txt" region="Text"/>' & @CRLF & _
' </par>' & @CRLF & _
' <par dur="180000ms">' & @CRLF & _
' <text src="TxT_8240.txt" region="Text"/>' & @CRLF & _
' </par>' & @CRLF & _
' <par dur="120000ms">' & @CRLF & _
' <text src="TxT_11575.txt" region="Text"/>' & @CRLF & _
' </par>' & @CRLF & _
' <par dur="10000ms">' & @CRLF & _
' <img src="att180.gif" region="Image"/>' & @CRLF & _
' </par>' & @CRLF & _
' </body>' & @CRLF & _
'</smil>'
Local $Test
$Test = StringRegExp($str, '<(?i)text\hsrc\="([^"]+)', 3)
If Not @Error Then _ArrayDisplay($Test, UBound($Test))
$Test = StringRegExp($str, '<(?i)img\hsrc\="([^"]+)', 3)
If Not @Error Then _ArrayDisplay($Test, UBound($Test))
$Test = StringRegExp($str, '<(?i)(?:text|img)\hsrc\="([^"]+)', 3)
If Not @Error Then _ArrayDisplay($Test, UBound($Test))
|