Jump to content

Clipboard snippet regex function?


Recommended Posts

Perhaps something like this exists, but I couldn't find it.

 

I sometimes would like to programmatically edit the clipboard in a snippet.

 

For example, I'd like a way to change all spaces to plus signs ("+"), so that one could select some text, invoke a snippet, and have the text replaced with the edited content, like turning some text into a URL for Google:

 

<a href="http://www.google.com/?q={clipboard:regex:s/ /+/}">{clipboard}</a>

 

which for the text "Muscovy simplex" would yield: <a href="http://www.google.com/?q=Muscovy+simplex">Muscovy simplex</a>

 
It seems this would have a great number of applications.
 
(It took my "+" out whet I posted...)
Edited by EcoReality
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...