Well you didn't really explain anything did you? How do you expect to be helped if you cannot even explain in proper English what you want to do exactly. (i want to use match multi-lines. <-- what kind of mambo jambo is this?)

Your code that you posted doesn't help with anything really, it just writes a few lines of text to a file. Your second post contains the exact same code but in bold, :rolleyes: as if putting it in bold is going to explain it better.

Why don't you explain with an actual example (not in coding but in words) what you want to do exactly, starting with a file that has a few lines of text, and what exactly you want to get from that file.

Going by your $read(file,r,.+) you just want to return 1 non-blank line from the text file, which you don't need a regex for by the way.


Gone.