Before anyone says anything, yes, of course I've seen this. But, it's not what I want.
What I'm looking for is basically a way to either alter the way \texttt works, or a new command that works just like \texttt does, but, instead of hyphenating only at spaces, making it hyphenate wherever it sees fit, because in my document I have things that don't contain any sort of dashes, and they're just really long randomly-generated strings of letters and numbers, so, they won't get hyphenated with that solution. I don't care how the text gets hyphenated, I just don't want it to overfull.
Why I want this? Well, I am using a command that takes my links, and then it strips them of any protocol info (http(s)://) or www, and shows them that way inside the compiled document, but keeps them functionally the same (when they get clicked on inside the PDF). The command comes from this thread:
\usepackage{expl3}
\usepackage{hyperref}
\ExplSyntaxOn
\newcommand{\clearurl}[1]{
\tl_set:Nn \parsed_url {#1}
\regex_replace_all:nnN {.://(?:www.)?(.[^\/])/?} {\1} \parsed_url
\href{#1}{\texttt{\parsed_url}}
}
\ExplSyntaxOff

\url, I am using something that transforms links into nicely-formatted\href-s – Andy3153 May 23 '22 at 16:38\hrefto make the link with the full url and use \path(ie\url` wihout the linking) to make the link text – David Carlisle May 23 '22 at 17:02\textttwith\path, and then use thexurlpackage? That doesn't work, it transforms all the links in the document in just\parsed_url, meaning it doesn't actually parse that command. – Andy3153 May 23 '22 at 17:12