The mixture contains nalidixic acid dissolved in chloroform then triethylamine and ethyl chloroformate were added and stirred for 30 minutes. Methanol was added to synthesize methyl ester. How to separate the ester only?
Nalidixic acid may be esterified using methyl chloroformate in presence of triethyl amine and DMAP catalyst in a suitable solvent. Pl refer J. Org. Chem., 1985, 50 (5), pp 560–565
Extraction with alkaline solution may cause hydrolisis of the ester.
Esters are less polar than the corresponding acid. The mixture may be resolved on silica gel column using an appropriate eluting mixture. e.g. chloroform/methanol 85:15 could work well. You should first perform some test by TLC to find the right solvents mixture. The ester will be the first eluted compound.
First you should rotaevaporate all solvents. Next you should dissolve the residue in a mixture of dicloromethane/ alkaline water (ph>10-12; you may use bicarbonate as Devanand suggested or NaOH). Extraction 2-3 times the water phase with organic solvent. In the aqueous phase should be the salt of the acid; on the organic the ester. Good luck
Bicarbonate is better here because NaOH may hydrolise your ester. Other weak base one can use is organic base , like TEA or DEA.....So if u solve then do inform here and still puzzled....also inform so that we will try more !!
If you encounter separation problems with the traditionnal methods such as extractions and silica chromatography as mentionned above, you can still take a look at ion exchange column chromatography since the two molecules are differentially charged.
http://en.wikipedia.org/wiki/Ion_exchange
I would use a basic resin, the ester should come out first.