SELECT basename('/usr/bin/bash'); SELECT basename('/usr/bin/bash/'); SELECT basename('bash'); SELECT basename('C:\\\\Users\\Documents\\test_file'); SELECT basename(path('http://example.com/folder_1/folder_2/script.php'))