I want to do this without using /s:
(?:.|\n)+
And I want it to be fast.
It is part of a bigger regexp, which is the reason I cannot use /s. I have tested:
perl -pe 's/(?:.|\n)+//' # 30 MBytes/s
perl -pe 's/[^\777]+//' # 124 MBytes/s
They are not as fast as /s:
perl -pe 's/.+//s' # 164 MBytes/s
Can I somehow get the same speed as /s?
Edit:
perl -pe 's/(?s).+(?-s)//' # 162 MBytes/s
perl -pe 's/[\d\D]+//' # 162 MBytes/s
perl -pe 's/[\s\S]+//' # 161 MBytes/s
These are all good options. Thanks.