Display all small molecules stored in Bioledge enpoint according to the term introduced

Database: 
Statement: 
Display all drugs stored in Bioledge enpoint according to the term introduced $term$ (e.g. AMP, ADP etc.)
A limit of results per page $number$ (e.g. 10)
Query: 
select distinct ?drug_name where{ ?s<http://www.w3.org/1999/02/22-rdf-syntax-ns#type><http://www.biopax.org/release/biopax-level3.owl#SmallMolecule> . ?s<http://www.biopax.org/release/biopax-level3.owl#displayName>?drug_name . FILTER regex(?drug_name,"??term","i") } LIMIT ??number