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

  • SEARCH
  • Home
  • 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 8013817
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T19:44:16+00:00 2026-06-04T19:44:16+00:00

I need help in parsing a text file. This text file has a few

  • 0

I need help in parsing a text file. This text file has a few html tags in it. What I am looking for is a Solution (Either in PHP or JS or both) which will strip all these, and store the output into separate variables.

  Integration/QA  
<http://shopfloor/sfweb/secure/CancelOrders>


  Development  
<http://shopfloor/sfweb/secure/CancelOrders>


------------------------------------------------------------------------

*HEADER INFO*
    *View Object:* 6541997  *BPO:* 0020064484   *Ack Date:* 2012-05-25
    *Operation(s):* PS_Queue, PS_BoxAll, JPN_End

------------------------------------------------------------------------

*EXTERNAL ORDER NUMBER REFERENCE*
*SAP Sales Order Number*    *Customer P.O. Number*  *Legacy Order Number*
0310407774      89FC37763001

------------------------------------------------------------------------

*PRODUCTS FOR THIS WORK OBJECT/OPERATION(S)*
*PL*    *Product #*     *Qty*   *Options*   *Serial #*
LN  AE241A  1        

------------------------------------------------------------------------

*Station Info*
*Start Station:* JPN_End    *Location:* Done    *Station:*
*Birth Date/Time:* 2012-05-22 08:26:17 SGT  *Power Cord:*   *Voltage:*

------------------------------------------------------------------------

*MATERIAL LIST FOR THIS WORK OBJECT/OPERATION(S)*
*Part Number*   *Qty*   *Description*   *BB Type*   *Material
Location*   *Serial Number*
AE241-90001     1   XP Remote Support Service Leaflet   BOM     PACK     


Privacy Statement

I basically Want to strip a few text from this code into php variables, so it will return:

$viewobject = "6541997"
$BPO = "0020064484"
$ackdate = "2012-05-25"
$operations = "PS_Queue, PS_BoxAll, JPN_End"
$sapSO = "0310407774"
$legacyON = "89FC37763001"
$pl = "LN"
$product = "AE241A"
$qty = 1;
$startstn = "JPN_end"
$location = "Done"
$bdate = "PS_Queue, PS_BoxAll, JPN_End"
$pn = "AE241-90001"
$qty = 1;
$description =" XP Remote Support Service Leaflet";

and the like. Is this possible?

  • 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-06-04T19:44:18+00:00Added an answer on June 4, 2026 at 7:44 pm

    Use regular expression.

    preg_match_all('/\*(view object|bpo|ack date):\*\s+([0-9\-]+)/i', $text, $m);
    
    // $m contains matches, try to print_r($m)
    
    $viewobject = $m[2][0];  // 6541997
    $bpo = $m[2][1];         // 0020064484
    $ackdate = $m[2][2];     // 2012-05-25
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I need help in parsing a very long text file which looks like: NAME
I need help in parsing big Json file: {status:{code:200,text:OK},content:[{proposalId:12536,providerId:1,supervisorName:null,supervisorEmail:lolbroek_13@hotmail.com,hostInstitution:qsd,hostCountry:qsd,hostCity:QSD,hostTypeId:1,title:qsd,status:available,numberStudents:null,description:qsd,categoryId:34,startDate:null,endDate:null,submitDate:null,expectedWorkload:null,purpose:null,workOrganisationId:1,function:null,audienceId:1,preConditions:,certificationGranted:null,deliverables:null,expenses:null,revenue:null,vacancies:null,uploadImg:http:\/\/193.136.60.238\/\/MUTW2012\/core\/img\/internship.png}, {proposalId:12537,providerId:1,supervisorName:null,supervisorEmail:lolbroek_13@hotmail.com,hostInstitution:qsd,hostCountry:qsd,hostCity:QSD,hostTypeId:1,title:qsd,status:available,numberStudents:null,description:qsd,categoryId:34,startDate:null,endDate:null,submitDate:null,expectedWorkload:null,purpose:null,workOrganisationId:1,function:null,audienceId:1,preConditions:,certificationGranted:null,deliverables:null,expenses:null,revenue:null,vacancies:null,uploadImg:http:\/\/193.136.60.238\/\/MUTW2012\/core\/img\/internship.png}, {proposalId:12538,providerId:1,supervisorName:null,supervisorEmail:lolbroek_13@hotmail.com,hostInstitution:qsd,hostCountry:qsd,hostCity:QSD,hostTypeId:1,title:qsd,status:available,numberStudents:null,description:qsd,categoryId:34,startDate:null,endDate:null,submitDate:null,expectedWorkload:null,purpose:null,workOrganisationId:1,function:null,audienceId:1,preConditions:,certificationGranted:null,deliverables:null,expenses:null,revenue:null,vacancies:null,uploadImg:http:\/\/193.136.60.238\/\/MUTW2012\/core\/img\/internship.png}, {proposalId:12539,providerId:1,supervisorName:null,supervisorEmail:lolbroek_13@hotmail.com,hostInstitution:qsd,hostCountry:qsd,hostCity:QSD,hostTypeId:1,title:qsd,status:available,numberStudents:null,description:qsd,categoryId:34,startDate:null,endDate:null,submitDate:null,expectedWorkload:null,purpose:null,workOrganisationId:1,function:null,audienceId:1,preConditions:,certificationGranted:null,deliverables:null,expenses:null,revenue:null,vacancies:null,uploadImg:http:\/\/193.136.60.238\/\/MUTW2012\/core\/img\/internship.png}, ................[etc] I
I need help with parsing of JSON feed text returned from Twitter. I need
I need help with getting a part of an XML file with tags like
I need help with parsing json string in Java Android Appl. Text of JSON
I need some help with parsing a line of text. The line of text
I need help parsing out some text from a page with lxml. I tried
I need help in retrieving a JSON object and parsing the array into my
I need some help with this! I´m passing multiple variables through URL and on
Need help to convert code from asp control to input type to fetch file

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.