Search code examples
regexcasesolaris

Ask RegEx for solaris


Does anyone know what the format is for these criteria?

bin::2:root,daemon

2

2

yes

I just want root, daemon and yes value in some case yes will change to no.


Solution

  • Welcome to StackOverflow Ben,

    You question wasn't very clear, but is this what you're looking for? If you give us a little more information, it's easier for us to help.

    bin::\d+:(root,daemon) \d+ \d+ (yes)
    

    Example: https://regex101.com/r/pauXBb/5

    It stores root, daemon in the first capturing group, and yes in the second.