# selected results of CrazyInsomniacs Substr impl. # doubles pacining converted to single by me. http://perlmonks.com/index.pl?node_id=68135 looks like the file name is: index.pl?node_id=68135 and the extension is: pl?node_id=68135 We even got a query string, whoa: node_id=68135 so the true filename would be: index.pl? and the true file extension would b: pl http://www.foobar.com/foo/ looks like the file name is: and the extension is: com/foo/ http://www.foobar.com/foo?test looks like the file name is: foo?test and the extension is: com/foo?test We even got a query string, whoa: test so the true filename would be: foo? and the true file extension would b: com/foo http:///file.ext looks like the file name is: file.ext and the extension is: ext #Selected results of CrazyInsomniacs regex implementation #input string added by me http://www.foobar.com (, , ) (http, www.foobar.com/, foo/bar/foobar.html) http://www.foobar.com/foo/bar/foo.bar.html http:///file.ext (, , )