At 10:54 PM -0800 12/13/99, Nicholas G. Thornton wrote: /(\d*)d(.\d*)?(\(\d*\))?/ I'm matching a string like "3d+2(5)" and parsing out to get {3,+2,5} ... Being a bit lazy, I think I'd try alternation or perhaps write a separate recognizer for each case of interest. Getting really fancy with REs can be hazardous to the robustness of your programs... -r -- Rich Morin: rdm@cfcl.com, +1 650-873-7841, http://www.ptf.com/~rdm Prime Time Freeware: info@ptf.com, +1 408-433-9662, http://www.ptf.com MacPerl: http://www.macperl.com, http://www.ptf.com/ptf/products/MPPE MkLinux: http://www.mklinux.apple.com, http://www.ptf.com/ptf/products/MKLP # ===== Want to unsubscribe from this list? # ===== Send mail with body "unsubscribe" to macperl-request@macperl.org