Just include your regex pattern inside a [regex_pattern] as follows: curl 'www.exampledomain/examplepath?siteid=[0-9]' #Calls url with every digit from 0 to 9