Jump to content

Search the Community

Showing results for tags 'regex'.



More search options

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • Alfred 3
  • Make the Most of Alfred
    • Discussion & Help
    • Bug Reports
    • Alfred Feature Suggestions
    • Themes
  • Alfred Workflows
    • Share your Workflows
    • Workflow Help & Questions
  • Alfred v2 Themes
  • Alfred Remote for iOS
    • Alfred Remote Discussion & Help
    • Remote Connection Troubleshooting

Categories

  • Articles
    • Forum Integration
    • Frontpage
  • Pages
  • Miscellaneous
    • Databases
    • Templates
    • Media

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


Twitter


Website URL


Jabber


Location


Interests

Found 7 results

  1. Why I need this? Sometimes I just found myself repeating copy/paste URL and title from Chrome to write some reference. Even worse, different apps accept different format (Yeah, I'm talking about you, Ulysses!). So here is my workflow: Usage Just type \\u in your favorite app. Problem 1. I tried and failed to use matches regex in Filter Utility, that's why I have to hard coded three (and maybe more in the future) filter. This is my failed attempt: Notes|Evernote|scapple 2. The else (marked in red in screenshot above) is not actually fallback, which may lead to some bug. # What I thought it would be if condition_a: ... elif condition_b: ... elif condition_c: ... # How it actually works if condition_a: ... if condition_b: ... if condition_c: ... Download https://github.com/cdpath/alfred_workflows/releases/tag/0.1.1
  2. 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.
  3. Hello, there is a filter where I can run script only if query matches reges. For example I can do: ^(ERROR:) So script will continue on only if query starts with "ERROR:". But how can I do something like "else" fir this "if"? I found out I can do second filter and put there: ^(?!ERROR:) So another regex that means "does not start with ERROR:". But what if there is really difficult regex? Do I really need to rewrite it? Or is there some way to do ELSE for filter?
  4. Here is a workflow for bulk renaming files. You select some files either in Alfred using the File Navigator or the File Buffer and use the File Action called "Rename with BulkRename", or select the files in Finder and use the hotkey to trigger the workflow for the selected files. Once triggered, Alfred will display a preview option and a bunch of preset actions that you can select. The preview option will display the modifications that will be made for each preset action listed. Preview Here are a couple of snapshot portions of what you see when pressing the Shift key: Issues are highlighted so that you know if running a preset will work or not. Even if you run that preset, nothing will happen. Preset Actions There are 6 actions included as a sample, but you can easily create your own actions using the .list keyword. To create a new preset, type in .list <new name>. Delete a preset using Cmd+Enter Each preset is nothing but a collection of simple steps that help make the preset action possible. For e.g. when you select the Append Sequence Number preset, you will be shown the preset editor: What the above tell is that the Append Sequence Number preset is a collection of two steps: add text '_seq' at end add number from 0, at end There are added to the preset using any of the steps [+] listed. You can add any number of steps to a preset, even the same ones over and over. You can delete an added step using Cmd+Enter When you add a new step to a preset, or edit an existing step by selecting it, you will be shown the Step Node Editor as above. The above is the example for the "Number Sequence" step, and for this step you can control what the starting number is, where the number should be added, and the format (leading zeros to be added). Items with a arrow -> are variables that you can change by pressing the Tab key. To add the step, just select the first option, and that step will be added to the Preset that you were viewing before. Steps Steps are the building blocks of each preset, and currently BulkRename has the following: Find and replace: find text and replace with another, supports regex and plaintext, case sensitive and insensitive Add text: add some text at the beginning or end of the filename Add timestamp: add a timestamp at the beginning or end of the filename. Timestamp is one of current time, file created or modified time. YYYY,YY,MM,DD,hh,mm,ss can appear in the format string Convert case: switch the case of the filename to lower, upper, or title Strip text: remove x characters from the filename either at the start of end Number sequence: append a running number sequence, starting from a value that you can specify MP3 Tagger (beta): Extract MP3 tags from MP3 files Regex group extractor: Regex group pattern extractor Change Extension: Allows you to change the extension of a file Keywords The main keyword is .rename (but you would not have to type that in if you use the File Action or the Hotkey) The second one to manage all your presets is .list. .preset and .node are keywords used by the workflow directly, and there is usually no need for you to type those in directly. Download Download from here Notes This works with Python 2.7.2 last I checked Have a look at the included sample presets using the .list keyword to get a hang of how presets are made, and then create your custom ones
  5. Hello! I'm writing a workflow based on a file action, and at one point in there, I would like to use the replace / regex function to extract just the filename, without the full path or the extension. I've tried googling and trying a bunch of options, but I haven't had the time to fully ingest Regex properly yet, and nothing I've found has worked. Anyone care to help me out? :-D Here's an example of a full path I'm working with: ~/Desktop/Testing.mov I would like to just extract "Testing". I hope one day I can look back at how silly it was to ask such a basic question like this. Thanks so much in advance!
  6. Hi everyone! Introducing Regex. http://code.instructorium.com/regex/ Copy any text on your computer. Fire up Alfred and type your search-and-replace regular expression. That's it! Other Features: 1. There is a "quoted" mode (sq) for people less familiar with regex, or simply for convenience. It disables all escaping, interpolation, and regex features. It is a plain-old search and replace. 2. You can save regexs you use often under a name, then execute them by name whenever you want! 3. coming soon: match previews The download link is on my website, which also has more thorough explanations: http://code.instructorium.com/regex/ Please contact me with feature requests or (hopefully not) bugs. You can leave comments here or on my website. Thanks!
  7. I've just made a simple workflow to test whether a Regular Expression matches a given string. You type the match keyword followed by the regex to test against everything that comes after. I hope someone else find it useful. Here's the download link: http://cl.ly/Og94 Any bug or feature requests, please ping me at https://twitter.com/samflores.
×
×
  • Create New...