Regexp :
preg_match('#^(\\w+)( | array )(\\w+)(?:|\\=(.*))$#', $line, $mtch)
Text :
integer udg_plc = 0
integer array udg_time
string array udg_plname
player array udg_dlforpl
multiboard udg_LastTable= null
integer array udg_kill1
As a result there is no matches. How to correct?
This is because there are more than 1 space in your input
/^(\w+)( +| +array +)(\w+)(?:| +\=(.*))$/
Use +
quantifier to match 1 to many spaces