You can use regular expressions to identify the things you need. Consider the following knowledge base:
DataProperty: hasCommonName
Individual: foo
Facts:
hasCommonName "Something"
You can retrieve the individual foo
by using the following class expression: hasCommonName some string[pattern "Some.*"]
. The string[pattern "Some.*"]
specifies the pattern to be matched. Warning, currently not supported by all reasoners (works for Hermit 1.3.7)