How to convert working bsh script to ksh script : I am unfamiliar with ksh scripting and I need this converted to a working ksh script asap.

    `egrep "^[^#;]" /etc/security/user | 
    while read x; 
    do 
    if [[ $x == '^\S+:' ]]; then 
    section=$x; 
    fi; 
    if [[ $section == 'nobody:' ]]; then 
    echo $x; 
    fi; 
    done`

 The contents of /etc/security/user are as follows:

    `sys:
            admin = true
            expires = 0101000070
            login = false
            rlogin = false
    adm:
            admin = true
            login = false
            rlogin = false
    nobody:
            admin = true
            expires = 0101000070
            login = false
            rlogin = false
    invscout:
            admin = true`

My goal is to be able to specify which user I would like to grab the parameters from and have it echo just that user's parameters. For example if I specify "nobody" in the command the shell should output:

        admin = true
        expires = 0101000070
        login = false
        rlogin = false

I understand ksh does not support pattern matching regular expression the same as bash does but am having trouble successfully converting the command. Any and all help would be greatly appreciated. The command without and spaces is as follows:
`grep "^[^#;]" /etc/security/user | while read x; do if [[ $x =~ '^\S+:' ]]; then section=$x; fi; if [[ $section == 'nobody' ]]; then echo $x; fi; done`
