The Sprig of Rosemary is a Spanish fairy tale collected by Dr. D. Francisco de S. Maspons y Labros in Cuentos Populars Catalans. Andrew Lang included it in The Pink Fairy Book.
It is Aarne-Thompson type 425A, the search for the lost husband.
The fairy tale is about a man who makes his only daughter work very hard. One day after work, he sends her to collect firewood and so she does. While searching for the wood, she picks herself a sprig of rosemary as well. Then a handsome young man appears and asks why she has come to steal his firewood. She replies that her father sent her. The young man leads her to a castle and tells her that he is a great lord and wants to marry her. She agrees so they marry.
While living there, she meets an old woman who looks after the castle and the woman gives her the keys but warns her that if she uses one, the castle will fall to pieces. After a time, curiosity overcomes her and she opens a door and finds a snakeskin. Her husband, a magician, uses it to change shape. Because she used the keys, the castle then falls to pieces. The girl cries, breaking off a sprig of rosemary and goes to search for him.
She finds a house of straw where the people living there, take her in service. However, she grows sadder by the day. When her mistress asks why, the daughter tells her story, and her mistress sends her to the Sun, the Moon, and the Wind, to ask for help. The Sun can not help her, but gives her a nut and sends her on to the Moon; the Moon can not help her but gives her an almond and sends her on to the Wind; the Wind does not know where her husband is but says he will look. He learns her husband was hidden in the palace of the king and is to marry the king's daughter the next day.