
Mcampb9713
Deleted
May 2, 2000, 10:15 PM
Post #1 of 3
(172 views)
|
|
String Separation in a file
|
Can't Post
|
|
If my data is separated by comma as in the below, I cannot use the s+ to separate the word... Does anybody know what to use... sample data and string to break up the data below: String to break data: $string =~ /^(\w+)\s+(\d+\/\d+\/\d+)\s+(\d+:\d+:\d+)\s+(\w+)\s+(\d+)\s+(\w+)\s+(\w+\W\w+)\s+(\w+)/; #\s+(\D+-\w+)/; #\s.*(\bHQ.*|ALT.*\b)/; I am putting each field in the variable below to load the data into Oracle: $NTID=$1; $Date_event=$2; $Time_event=$3; $User_accnt=$4; $Event_ID=$5; $Type_Event=$6; $Computer_Event=$7; $Source_Event=$8; $Server_name=$9; $End_word=$10; DATA: SEC,2/14/00,22:11:52,Security,517,Success,System Event ,NT AUTHORITYSYSTEM,HQ-S-N-00,SYSTEM NT AUTHORITY Primary SEC,2/14/00,22:12:11,Security,528,Success,Logon/Logoff ,HQSRusso,HQ-S-N-00, SRUSSO HQ 3 KSecDD MICROSOFT_AUTHENTICATION_PACKAGE_V1_0 HQ-W-W-23C4 SEC,2/14/00,22:16:19,Security,528,Success,Logon/Logoff ,HQHQBackup,HQ-S-N-00, HQBackup HQ 3 KSecDD MICROSOFT_AUTHENTICATION_PACKAGE_V1_0 HQ-S-N-01
|