Alcohol in food
In the Hanafi school there is a dispensation with respect to alcohols that are non-wine, namely, not extracted from grapes, nor from dates or raisins.
On this basis vanilla essence is permitted to use in food and the like, even if there is some incidental remnant of the carrier alcohol.
Likewise it would be permitted to consume drinks that have incidental traces of non-wine alcohol as long as:
a. It is not being used to intoxicate,
b. Not being used as intoxicants are used,
c. Not being used in an amount that intoxicates, and
d. Not being being used for vain purposes.
Some soft drinks like Coke, Pepsi, Bundaberg flavoured drinks and others have been tested with small traces of alcohol found in them. The legal level allowable in a soft drink for it to be labelled as a non alcoholic beverage in Australia is 0.5%.
Note that the dispensation with respect to alcohols applies to those that are non-wine, namely, not extracted from grapes, nor from dates or raisins.
This is based on the position of Abu Hanifa and has been adopted by leading scholars of our time due to the widespread use of non-wine alcohol in both food items and external products (such as soaps or lotions).
As for wine, namely alcohol derived from the fermentation of grapes and dates, it is impermissible to consume in any amount as established by clear primary texts.
However it would be religiously superior, where reasonably possible, to avoid the varieties containing such alcohol in order to respect the difference of opinion of other schools on the matter.
[Maydani, al-Lubab fi Sharh al-Kitab (581); Usmani, Takmilat Fath al-Mulhim(3.342)
Allah knows best.
Shaykh Mohammed Shakeeb