This
sed "s/public \(.*\) get\(.*\)()/\1 \2/g"
will transfor this
public class ChallengeTO extends AbstractTransferObject {
public AuthAlgorithm getAlgorithm();
public long getCode();
public int getIteration();
public String getPublicKey();
public String getSelt();
};
into this
public class ChallengeTO extends AbstractTransferObject {
AuthAlgorithm Algorithm;
long Code;
int Iteration;
String PublicKey;
String Selt;
};
I want to change Algorithm
to algorithm
, PublicKey
to publicKey
and so on. How can I transform the first character of the second segment (\2
) to lower case?
UPDATE
sed "s/public \(.*\) get\([A-Z]\)\(.*\)()/\1 \2\3/g"
selects "my letter" as \2
, but if I place a \L
before it it transforms too much (including \3
)