in reply to Regex confusion

Another way to do it, using split:

$a = "OPSms -N op01Sms1 -t SMS -T 0x70000000 -U op01/op011 -I sms1"; @a = split( /\s+-\w\s+/, $a); print "@a\n"; Output: OPSms op01Sms1 SMS 0x70000000 op01/op011 sms1

You want $a[0], $a[1], $a[3]