Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Wanet Telecoms Ltd on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

simple question

Status
Not open for further replies.

tsp120

Programmer
May 21, 2003
52
US
Hi,

I have a simple problem. I need to search in a string for an underscore and then 4 digits. ie "_1234". I then want to take this block of the string and store it in a variable. Can anyone help me with this?

Thanks
 
I know I can say

if ($var =~ /_\d\d\d\d/)
{
}

but I dont' know how to take those characters and store them into an array.
 
sorry, not in an array, I meant in a seperate variable.
 
got it working, thanks I appreciate it
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top