^\(.+\)*(.+).(.+)$
This regex has been tested on these two examples:
varwwwwww.example.comindex.php
index.php
First block "(.+)*" matches directory path.
Second block "(.+)" matches file name without extension.
Third block "(.+)$" matches extension.
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…