The regulator can probably handle 18 but the higher the voltage the more power gets wasted as heat in the regulator. The actual maximum will depend on hoe much current your circuit draws because that will determine how much power the regulator will have to dissipate into the air and thus how hot the regulator gets. At some point the regulator will overheat and fail.