What are you working on? - Programming On Unix
Users browsing this thread: 58 Guest(s)
|
|||
Doing small url/other tokens parser which would feed fzf to pick something from the terminal window without the mouse. Here is regex, any critique is welcomed:
Code: grep -aEo "(((http|https|git|gopher|gemini|ftp)://|www\\.)[a-zA-Z0-9._-]*[:]?[a-zA-Z0-9./@$&%?\#=_~-]*)|([a-zA-Z0-9._-]*\\.(com|ru|xyz)/*[:]?[a-zA-Z0-9./@$&%?\#=_~-]*)|(tel:[0-9+]*)|(mailto:[a-zA-Z0-9._-]*@[a-zA-Z0-9._-]*)|([a-zA-Z0-9._-]*@[a-zA-Z0-9._-]*)|((magnet:\\?xt=urn:btih:)[a-zA-Z0-9./@$&%?\#\(\)=_~-]*)|([0-9]*\\.[0-9]*\\.[0-9]*\\.[0-9]*)" |
|||