| 100 | static const regex parse_path_regex("^(.*/)?(?:$|(.+?)(?:(\\.[^.]*$)|$))"); |
| 101 | |
| 102 | string Uri::pathFile() const |
| 103 | { |
| 104 | smatch matches; |
| 105 | if (!regex_match(mPath, matches, parse_path_regex)) |
| 106 | return string(); |
| 107 | |
| 108 | string base = matches.str(2); |
| 109 | string ext = matches.str(3); |
| 110 | |
| 111 | return base + ext; |
| 112 | } |
| 113 | |
| 114 | string Uri::nativePath() const |
| 115 | { |