What are the limitations on using if/ Else-if/ Else-if statement then if there's any?
There aren't any. The only thing to be careful of is making sure that all if statements can be reached. Since your first one deals with all characters that are not a comma, and the second one deals with all (remaining) characters that are commas, there is no way for the third if statement to ever be reached. It seems like you want to move the third statement into the else if block that deals with the commas.