in reply to Re: Extract the variable
in thread Extract the variable

Thanx dear!!! Its working now!!! Can I use substr instead of regex?

Replies are listed 'Best First'.
Re^3: Extract the variable
by Fletch (Bishop) on Jun 25, 2007 at 12:12 UTC
    &ot

    Presuming ".declare " is a fixed prefix and the variable name is always followed by a real space character (i.e. you're not worried that there's a TAB instead) then yes you could use substr starting at offset 10 after using index (also starting at offset 10) to find where the variable name ends.