Jump to content

Substitute Tab character with Return

Recommended Posts

Thank you very much for your help @deanishe. I have found an old comment by @Andrew stating that Alfred uses NSRegularExpression for regex search and replace and that \n in the substitution field is not recognized because the \ character is taken as a literal. The solution offered by @Andrew is to use Alt+Return instead. I have tried it and it works, but now there is a second problem: once you input Alt+Return in the substitution field there is no way to delete it because it doesn't appear in the field, so I had to delete that element in the workflow and recreate it.


The post where Andrew talks about it is here:



Link to comment
2 hours ago, Bottacco said:

It didn't occur to me to use ⌘A on an empty field


The field's not empty. Newlines are invisible.


2 hours ago, Bottacco said:

I hope that the behavior with regex with normal things like \t and \n becomes standard


Yeah. That's pretty much how they work everywhere else, and it's surprising and somewhat frustrating that Alfred doesn't understand things like \n.

Link to comment

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
  • Create New...