Support for changing case of regex match expression in replace interface

Problem:

I have a bunch of fields in my file:

private String m_field;
private String m_otherField;
private String m_lastFieldIPromise;

I want getters for these fields, so I'll use the handy dandy (alt+insert) -> Insert Getters, which creates

public String getM_field()
{
    return m_field;
}

public String getM_otherField()
{
    return m_otherField;
}

public String getM_lastFieldIPromise()
{
    return  m_lastFieldIPromise;
}



Now these getters are kind of ugly because of my company's m_ field naming convention. So I'd like to replace the names of the getters with the standard

getField()
getOtherField()
getLastFieldIPromise()

format.

However, the replace dialog (ctrl+R) doesn't seem to have a way to make the match expression uppercase. Ideally I could do the following:

1) select all getters
2) Ctrl+R
3) Check [regex, selection only, case sensitive]
4) Find: M_.
5) Replace: \U$1\E

Everything between \U and \E would be uppercased,
similarly \L and \E could be used to lowercase.

This would give me my desired result.

Please sign in to leave a comment.