MCPcopy Create free account
hub / github.com/IJHack/QtPass / protocolRegex

Method protocolRegex

src/util.cpp:269–273  ·  view source on GitHub ↗

* @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. *

Source from the content-addressed store, hash-verified

267 * @return QRegularExpression reference
268 */
269auto Util::protocolRegex() -> const QRegularExpression & {
270 static const QRegularExpression regex{
271 "((?:https?|ftp|ssh|sftp|ftps|webdav|webdavs)://[^\" <>\\)\\]\\[]+)"};
272 return regex;
273}
274
275auto Util::newLinesRegex() -> const QRegularExpression & {
276 static const QRegularExpression regex{"[\r\n]"};

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected