Normally the dot matches any character except newlines.
So if .*
isn't working, set the "dot matches newlines, too" option (or use (?s).*
).
If you're using JavaScript, which doesn't have a "dotall" option, try [sS]*
. This means "match any number of characters that are either whitespace or non-whitespace" - effectively "match any string".
Another option that only works for JavaScript (and is not recognized by any other regex flavor) is [^]*
which also matches any string. But [sS]*
seems to be more widely used, perhaps because it's more portable.
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…