nohl Posted January 16, 2020 Share Posted January 16, 2020 I want to make a simple replacement to convert a multi-line block of text into a more html-friendly format. example: Have this... quick brown fox Want this... quick<br/> brown<br/> fox I've got a workflow Replace utility that looks like this: My result is this... quick<br/>/nbrown<br/>/nfox I'm guessing my escape character in the replace field is totally wrong. Any suggestions? Link to comment
deanishe Posted January 16, 2020 Share Posted January 16, 2020 (edited) IIRC, Alfred only supports escapes like \n and \t in the regex field, but not the replacement field. You have to paste a literal linebreak (tab character etc.) in there instead. Edited January 16, 2020 by deanishe joeynotjoe 1 Link to comment
vitor Posted January 18, 2020 Share Posted January 18, 2020 I seem to recall this having been discussed/requested previously, but a quick search isn’t turning up the post. I don’t remember if it was a proper feature suggestion or a post in passing. Link to comment
deanishe Posted January 19, 2020 Share Posted January 19, 2020 8 hours ago, vitor said: I don’t remember if it was a proper feature suggestion or a post in passing. It has come up a few times in connection with various workflow elements. This was the most recent one, I believe. Link to comment
elchead Posted October 10, 2021 Share Posted October 10, 2021 Hi, I am trying to append notes to a textfile and would like to add a line break, for which I want to use a replace character such as a pipe. But whatever I do, the text doesn't get replaced. I also tried string replace. I tried everything and am without clue, do you have any idea? Link to comment
deanishe Posted October 10, 2021 Share Posted October 10, 2021 Sorry, it's not clear what you're doing from your screenshot (that's why we ask you to always upload your workflow, so we can have a look). If you want to use a line break in Alfred's replace element, you have to paste a literal line break. Escapes like \n don't work. Copy and paste a line break from a text file. Link to comment
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now