Replace with regular expressions... how to capitalize words?
I have text in a file like hello_there, and I want to convert it to Hello There.
So far I'm not seeing anything about capitalization in the docs:
https://www.jetbrains.com/help/phpstorm/regular-expression-syntax-reference.html
请先登录再写评论。
What are you trying to accompish? Do you need to rename a file, or insert some code (via file or live template) that would use a capitalized file name?
I explained what I'm trying to accomplish... change text in a file like `hello_there` to `Hello There`.
So far I open the Find/Replace box (Cmd+R), like this:
But that of course just changes it to `hello there`.
Do you know how to make $1 and $2 capitalize the words?
You can use
\uthat causes next character to output in uppercase. It's documented in https://www.jetbrains.com/help/phpstorm/regular-expression-syntax-reference.html:\uChanges the case of the next character to the upper case. Use this type of regex in the replace field.
Thanks I'll try that, but the link says 404 Uh Oh, I think because it has a colon at the end.
I searched for "capitalize" on that page (as opposed to "case"), which is why I didn't find the `\u` option.