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 \u that causes next character to output in uppercase. It's documented in https://www.jetbrains.com/help/phpstorm/regular-expression-syntax-reference.html:


Changes 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.


Please sign in to leave a comment.