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 8996729
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T23:47:37+00:00 2026-06-15T23:47:37+00:00

I want to scrape data from some text and dump it into an array.

  • 0

I want to scrape data from some text and dump it into an array. Consider the following text as example data:

| Example Data
| Title: This is a sample title
| Content: This is sample content
| Date: 12/21/2012

I am currently using the following regex to scrape the data that is specified after the ‘colon’ character:

/((?=:).+)/

Unfortunately this regex also grabs the colon and the space after the colon. How do I only grab the data?

Also, I’m not sure if I’m doing this right.. but it appears as though the outside parens causes a match to return an array. Is this the function of the parens?

EDIT: I’m using Rubular to test out my regex expressions

  • 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-15T23:47:38+00:00Added an answer on June 15, 2026 at 11:47 pm

    You could change it to:

    /: (.+)/
    

    and grab the contents of group 1. A lookbehind works too, though, and does just what you’re asking:

    /(?<=: ).+/
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I want to scrape string data from some binary text files that contain embedded
I want to scrape text data from a windows application to do additional processing
I want to use greasemonkey to scrape wiki data from Last.fm (this is not
Can this be done if so, how? I want to scrape data from xbox.com
i am trying to scrape some data from this site : http://laperuanavegana.wordpress.com/ . actually
Basically, I want to scrape some options data daily from Yahoo! Finance. I have
I am trying (in R) to scrape some data from: http://www.soccerbase.com/matches/results.sd?date=2012-11-04 namely, I want
My question is: How to scrape data from this website http://vtis.vn/index.aspx But the data
I am trying to use the HTML Agility pack to scrape some data from
The problem: I want to scrap some data from certain webpage (I have administrative

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.