Test, validate and match regular expressions
This regex matches the string 'cuda' optionally followed by a colon and one or more digits, such as 'cuda' or 'cuda:0'. It is useful for validating or parsing GPU device identifiers in CUDA-related configuration, command-line arguments, or environment variables. The multiline flag allows it to match against each line in multi-line text.