Matthew Lancellotti
-
Posts
15 -
Joined
-
Last visited
-
Days Won
1
Reputation Activity
-
Matthew Lancellotti reacted to johnjoonso in Regex - Run and save regular expressions!
Really great script!
How can I modify the script so that it works on the selected text in whatever app I have open?
-
Matthew Lancellotti reacted to johnjoonso in Regex - Run and save regular expressions!
I thought I understood some regex but I'm confused here, how does one enter the replace string?
edit: I see, its the "/"
-
Matthew Lancellotti got a reaction from cands in Regex - Run and save regular expressions!
Version 1.5.0 is here. Here are the improvements:
A checkmark appears on the icon when your regex is valid (correct syntax). Regex will not execute invalid regexs. It is…awesome.
You have full control to do custom regexing by opening the file at ~/Library/Application Support/Alfred 2/Workflow Data/com.verykiwi.com/RegexSequences.pl. Your custom regexs remain even when updating Regex.
Quoted regexs (sq) can be saved.
-
Matthew Lancellotti got a reaction from cands in Regex - Run and save regular expressions!
Perform a search and replace on copied text, and save regexs for future use.
Download:
http://code.instructorium.com/downloads/Regex.alfredworkflow
Please visit http://code.instructorium.com/regex for more information. (also on Packal: http://www.packal.org/workflow/regex ) A summary is below:
Commands you can use:
1. Any regular expression (no keyword necessary, Perl-style) "s/this/that/msg" "s@\$(\d+)\.(\d{2})@$1 dollars and $2 cents@g", etc.
2. Follow your regular expression with " save as " and then a name in order to save it for future use. "s&this&that&xg save as mythisthat", etc.
3. Use the "regex" keyword followed by the name you saved it under to execute a saved regex. "regex mythisthat", etc.
As far as I know, it works on all versions of Alfred 2 and all versions of OS X. Your custom workflows are saved under ~/Library/Application Support/Alfred 2/workflows/com.verykiwi.regex/RegexSequences.pl. You can delete the com.verykiwi.regex folder after uninstall. Feel free to contact me if you have any issues.