There is an excellent book available in many libraries:
In search of the "forlorn hope" : a comprehensive guide to locating British regiments and their records (1640-WWI) / by John M. Kitzmiller, II.
It is in 2 vols. It lists regiments by location and dates. It might help you narrow down which regiments were in New Brunswick in 1840.
After the Rebellion of 1837, many British regiments were in various parts of Canada and many of them left around 1842. If you know the various places where you ancestors were born, it would give you a good idea which regiment your ancestor would have belonged to.
Good luck