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 gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

HELP!!!!! 1

Status
Not open for further replies.

sergelaurent

Technical User
May 30, 2005
52
FR
I have a variable containing the following string:
osqfjqoif2005-06-01-15-42-42313qjnfo2005-06-01-15-42-48095
At the end, I would like to have a list with:
2005-06-01-15-42-42313
2005-06-01-15-42-48095
ONLY.
So I wanted to know which command(s), I can use to do this!!
 
There are several ways to do it but you need to supply more information. If your string is always so-many characters and the target is always in the same place, that's one way. If the part of the string you want is always a string of numbers with dashes, and those characters don't appear where you don't want them, that's another way.

_________________
Bob Rashkin
rrashkin@csc.com
 
In fact my problem consists of reading the number the date and time. The exact location of this data is given but I have to convert the size which is coded in unicode caracters into decimal. That's why I have ask the question about the conversion from a caracter to decimal.

Cheers,
lolo
 
regexp {(\d{4}-\d{2}-\d{2}-\d{2}-\d{2}-\d{5})[a-zA-z]*(\d{4}-\d{2}-\d{2}-
\d{2}-\d{2}-\d{5})} $a match b c

where a is your input string

_________________
Bob Rashkin
rrashkin@csc.com
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top