0
正則表達式:正則表達式中的錯誤?
preg_match('#^(\\w+)(| array)(\\w+)(?:|\\=(.*))$#', $line, $mtch)
文字:
integer udg_plc = 0
integer array udg_time
string array udg_plname
player array udg_dlforpl
multiboard udg_LastTable= null
integer array udg_kill1
結果是沒有匹配。如何糾正?
有必要知道些什麼?需要正則表達式會從提供的文本中找到每一行。 –
首先,您使用PHP,這意味着您不需要使用雙反斜槓,所以使用'\ w +'。你也不需要轉義'=',這意味着只需使用'='。除此之外,你想匹配什麼? – HamZa