I am running through a scenario where i have to create table through jdbc statement and i am receiving the table name as method argument. Oracle database is used and Oracle has naming rule like table name should not start with any of these following character $#_
. I want to replace all those special character only from the beginning but not from in_between or at the end. For example:
#_PHYSICIANS
→ PHYSICIANS
##_#_PHYSICIANS
→ PHYSICIANS
##_#_PHYSICIANS_#_NAME
→ PHYSICIANS_#_NAME
What Regular expression shall I use to replace these characters from the beginning?