I'm not sure if it's a different RegEx pattern than other languages, but you may wish to try: temp_[^\.]* [] typically indicates a character class or set of characters. ^ is used to indicate unallowed / exception characters . will typically need to be escaped, depending on context.