The word starts with -D(It may be d also) Followed with..IT may contain spaces or do on not caontain After that its Followed by a $ Then the series is{rajna_NAME} To be brief
-d ${ranjana_wdgf_NAME}or -D${Tom_task_NAME}
i want to extract
ranjana_wdgf
Tom_task
My doubt is
if($word =~m/^-D(\$)\|(\w*NAME)\b/)
Whats wrong: Please provide suggestion