I'm basically trying to capture:
1. The ticket number: (for example, ACCOUNT-09782)
2. The CreatedDate field and value mentioned in the Remedy Case Data section (not the Remedy Account data section that appears earlier in the record).
3. The ClosedDate field and value mentioned in the Remedy Case Data section
I was thinking something along the lines of :
Any tips much appreciated!$/ = "\n\n"; while (<DATA>) { chomp; my $line = $_; $line =~/(ACCOUNT-\d{5}).*Remedy Case data.*(ClosedDate.*)\\.*(Created +Date.*)\\/; my $account = $1; my $closed = $2; my $created = $3; . . . }
__DATA__ ACCOUNT-09782 comment \ Remedy Account data: \ IsDeleted = No\ Name = Singtel PMC\ Type = Existing Account\ Industry = Network Operator\ OwnerId = Foo Foobar (foo@whatever.com)\ CreatedDate = 2007-02-21 23:59:56\ \ Remedy Account Contact Role data: \ None found\ \ Remedy Case data: \ CaseNumber = 00013383\ ContactId = Sharon Tesla\ AccountId = Blah blah\ Type = Problem\ Status = Closed\ Reason = User create/change/delete from system\ IsVisibleInSelfService = 1\ Subject = Setup Login Credentials / Lando Franklin\ Priority = Medium\ Description = Please set up Lando Franklin with login credentials. Yo +u may mirror my profile. Her email address is 2326265@whatever.com. + Thank\ you!!!\ IsClosed = 1\ ClosedDate = 2007-10-26 16:31:53\ Actual Work Time = 1.00\ CreatedDate = 2007-10-23 21:10:10\ CreatedById = 00500000006onM1AAI\ Environment__c = Production\
In reply to using regex with records by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |