The song has been collected many times in England; by the collectors working just before the First World War, and also by those active after the Second. It seems to have been particularly popular in East Anglia in recent times, but was found all across the southern counties, from Sussex to Somerset, but no version seems to have been noted further north than Herefordshire. It has also been found, once or twice, in North America.
As with many other traditional songs, this one may be an amalgamation of two songs, or it may have undergone radical rewriting in the mid-nineteenth century. The earliest versions, called The Wandering Girl, or Once I Loved, dating from perhaps the 1820s, are from the female perspective, and do not include the verses about 'flash company' or a 'yellow handkerchief’. The earliest version I can find with these elements is a broadside, where the song is actually called Flash Company, which is undated but is probably from the 1850s or perhaps a little earlier.
It is quite possible that the song refers to yellow silk handkerchiefs that were popular with sporting types - especially the boxing fraternity - in and around the 1830s. These handkerchiefs were called 'yellow-men' or 'yellow-fancies' and were not like our present pocket-handkerchiefs but were large enough to tie round the neck. The well-known sporting and low life writer, Pierce Egan, includes the following comment in his Book of Sports (1832), 'Sporting the yellow-man. The wipe was bright yellow, made on purpose for him'.