10 $string =~ s/ *([@\/]) */$1/g;
11 my ($userid, $diag, $password, $netServiceName) = $string =~ /'?([^@\/']+)?(?:(\/)'?([^@\/']*)'?)?(@[^@\/']+)?'?/;
####
SYS / foo_pw @ stuff
SYS / ' foo_pw1' @ stuff
SYS /' foo_pw2' @ stuff
SYS / foo sp ace @ stuff
SYS/change_on_install@prod1
LAST
rman/rman@rcat
SYS
/
/fooey
/fooey@foobar
SYS@foobar
'simple/fooey@foobar'
####
< SYS> < /foo_pw> [ @stuff]
< SYS> < / foo_pw1> [ @stuff]
< SYS> < / foo_pw2> [ @stuff]
< SYS> < /foo sp ace> [ @stuff]
< SYS> [ @prod1]
< LAST> < > [ ]
< rman> < /rman> [ @rcat]
< SYS> < > [ ]
< > < /> [ ]
< > < /fooey> [ ]
< > < /fooey> [ @foobar]
< SYS> < > [ @foobar]
< simple> < /fooey> [ @foobar]