Skip to main content
7 events
when toggle format what by license comment
Jul 19, 2019 at 12:11 comment added JJoao @choroba, you are right, That is equal to the sed version. In order to show the more powerful s///e I was planning perl -pe 's/src="\K(\w+)/ucfirst(lc($1))/e' , but that can still be done with \u operators.
Jul 19, 2019 at 12:06 comment added JJoao @ilkkachu, you are right. I was planning something more complex ucfirst(lc($1))
Jul 19, 2019 at 12:01 comment added choroba Also, use \u in perl, there's no need to eval.
Jul 19, 2019 at 11:58 comment added ilkkachu I think you can drop the + from \w+ and just use s/src="\K(\w)/uc $1/e since it's only the first letter after the quote character we're interested in.
Jul 19, 2019 at 11:42 history edited Philippos CC BY-SA 4.0
\U is a GNU extension
Jul 19, 2019 at 10:54 history edited JJoao CC BY-SA 4.0
added 95 characters in body
Jul 19, 2019 at 10:44 history answered JJoao CC BY-SA 4.0