When you have decided not to use any transformer, then you cannot be able to use voltage regulators directly. You can use some combination of resistors and polypropylene capacitor, but I would not recommend u to use it. Because it will be unsafe & tedious to adjust the voltage.
There is only one best solution in my mind.
R2 should be a variable resistor(potentiometer). If the output is more than 40Volt, try to replace R2 with 15KΩ resistor. REMEMBER: Output is still AC. Tune the resistance and check the output with a multimeter. If the output is about 30 volt, rectify it and pass it through LM317 by the following method....
All you have to do is to adjust the potentiometers.....
Use electrolytic capacitor with large capacitance value(~20000uF)
Read the datasheets and surf for information in wikipedia for diac and triac.
For any query, feel free to post.....
I don't want to be responsible for the triac circuit.... It is designed by me in only 10 minutes...