Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6100129
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T13:21:03+00:00 2026-05-23T13:21:03+00:00

Im going through a log file using php and it looks either like this:

  • 0

Im going through a log file using php and it looks either like this:

11/06/05 09:17:59 TORMS068 11/06/05 09:17:59.234 TORMS068\Admin ... EPTH{2} ITEMIX{8} TELL{`` sdcsit49 - FileSystem /oracle/REF/sapdata2 Critical - MSGREC:1727:100 ``} USE{TELL} ATTACHMENT... xact{`NO`}

Where I used Ellipses to show there were a lot of other stuff

OR like this

11/06/05 11:29:38 TORM ... H{3} ITEMIX{5} TELL{``marble: initiator SCSI ID now 7 } File={ /var/adm/messages } - MsgRec 5174:406``} USE{TELL} ATTACHMENT{} UserParms{}   AnswerWait{`10`} BaudRate{`1200`} C... eviceId{``} TellExact{`NO`}

So it is either followed by a USE{TELL} or File={.*}
I want to extract what is in the {}’s for TELL{} for every line in the log file..
Please help me, I’m going crazy lol

Thanks

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-23T13:21:04+00:00Added an answer on May 23, 2026 at 1:21 pm

    Well I couldn’t get a reliable method to work, but what I ended up with was

    if (preg_match("/(TELL{)(.*)} (USE{T)/iU ",$data,$matches)) 
        $rowMsg=substr($matches[0],5,-7);
    $rowMsg=preg_replace("/[}\. ]{1}\$/",'',$rowMsg);
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm going to reset IIS through a batch file. Using iisreset utility, as the
I have a file that I'm using to log IP addresses for a client.
I have a log file with backspace characters in it (^H). I'm looking through
I'm going through the pain of upgrading PHP on my server from 5.2 to
I'm new to python and have been going through some tutorials on log parsing
I'm using the FileStream and StreamReader classes like so: using(FileStream stream = File.Open(filePath,FileMode.Open,FileAccess.Read,FileShare.ReadWrite)) {
Going through some of my older Delphi projects and upgrading them to D2009, as
Going through Javascript documentation, I found the following two functions on a Javascript object
Going through the microsoft authentication tutorial listed here they have you create a master
While going through university and from following the development of SO, I've heard a

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.