I have the following regex that I have been using successfully:
preg_match_all('/(\d+)\n(\w.*)\n(\d{3}\.\d{3}\.\d{2})\n(\d.*)\n(\d.*)/', $text, $matches)
However I have just found that if the text that the (\w.*)
part matches starts with a foreign character such as Ä
, then it doesn't match anything.
Can anyone help me with what the correct pattern should be instead of (\w.*)
to match a string that starts with any character?
Many thanks