regex take all string starting from code example Example: regex all starting with #check if word starts with "test" ^test.*$