jonteamere Posted August 21, 2017 Posted August 21, 2017 I like the idea of transforming inputs before passing them to a script. Is there a way to capitalize the first letter of a input AND add a period if one does not exist (prior to passing to script)? It would be similar to using the transform utility. I don't see an option for sentence capitalization. I use Alfred to append notes from OS X selections. Sometimes the selections begin with a lowercase character &/or is not punctuated. Any solutions?
vitor Posted August 21, 2017 Posted August 21, 2017 Looks like the Replace Utility in Alfred can’t do the necessary regex transformations. But you can do it via a bash Run Script with perl -pe 's/^(.)(.*?)\.?$/\U\1\E\2./' <<< "${1}".
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