* @brief Returns a regex matching common remote/network protocol schemes. * * Matches http://, https://, ftp://, ftps://, ssh://, sftp://, webdav://, * webdavs:// * * Note: Local file URLs (file:///) are intentionally excluded by design, as * they represent local paths rather than network protocols. If this behavior * needs to change, update both this function and the corresponding test. *
| 267 | * @return QRegularExpression reference |
| 268 | */ |
| 269 | auto Util::protocolRegex() -> const QRegularExpression & { |
| 270 | static const QRegularExpression regex{ |
| 271 | "((?:https?|ftp|ssh|sftp|ftps|webdav|webdavs)://[^\" <>\\)\\]\\[]+)"}; |
| 272 | return regex; |
| 273 | } |
| 274 | |
| 275 | auto Util::newLinesRegex() -> const QRegularExpression & { |
| 276 | static const QRegularExpression regex{"[\r\n]"}; |
nothing calls this directly
no outgoing calls
no test coverage detected