I need to write a script which can do the followings ---
1> check if the line has ---> class (followed by tab or spaces) class name shouldn't start with lower case letters or numerics, it should only start with Upper case followed by lower case alphabets.
like, class MyClass
not class myClass
2> all the variables should start with lower case first letter, like
String myString
or int myInt
or long myLong
or double myDouble
or boolean myBoolean
I want to do it with sed, I'm trying to do this, but its not working, pls help.
s/class .*'[^a-z0-9]'.*/\/\/ERR: class name should start with Upper case*** /g
Regards
prasen
Start Free Trial