The present invention relates to methods of isolating flavonoids from Euphorbia cuneata, and a pharmaceutical composition comprising the flavonoids or the extracts or both of them for a use as anti-ulcer agent. The present invention further relates to a method of providing an anti-ulcer treatment to an animal in need thereof comprising administering to the animal a compound selected from 4′-methoxy-luteolin-7-O-rhamnoglucoside and aromadendrin. A method of providing an anti-ulcer treatment to an animal in need thereof comprising administering to the animal a compound selected from 4′-methoxy-luteolin-7-O-rhamnoglucoside and aromadendrin, in which the compound(s) are isolated from Euphorbia cuneata.