Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

128
Views
Cómo capturar el siguiente tine después de cierta línea anterior en el node.js

El archivo de registro tiene cierta cadena que sucede varias veces. Necesito capturar la siguiente línea para todas las apariciones de esta cadena anterior con node.js. Por ejemplo contenido del archivo:

 Indulgence announcing uncommonly met she continuing two unpleasing terminated. Now busy say down the shed eyes roof paid her Compile Error ./aaarty/bbb/cfvcc/dddhjklpi Course suffer to do he sussex it window advice. Yet matter enable misery end extent common men should. Her indulgence but assistance favourable cultivated everything collecting Compile Error ./asshtyd/wrfber/ghn/fffh/gh/ikjmlk Extended kindness trifling remember he confined outlived if. Assistance sentiments yet unpleasing say Compile Error ./cc/wwwasftbb/kkk/tgfh/pioqascfg/qqq Open they an busy they my such high strong text

Usando node.js, necesito capturar cada línea que va después de la línea con la cadena "Error de compilación"

about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

Lo tengo:

 var fs = require('fs'); var array = fs.readFileSync('mylogfile.txt').toString().split("\n"); for(let i in array) { if (array[i] == "Compilation Error") { let k = parseInt(i)+parseInt(1) console.log(array[k]) } }
about 4 years ago · Juan Pablo Isaza Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!