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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T11:09:56+00:00 2026-05-28T11:09:56+00:00

This is the source text I want to parse: 1 From fairest creatures we

  • 0

This is the source text I want to parse:

                       1
      From fairest creatures we desire increase,
      That thereby beauty's rose might never die,
      But as the riper should by time decease,
      His tender heir might bear his memory:
      But thou contracted to thine own bright eyes,
      Feed'st thy light's flame with self-substantial fuel,
      Making a famine where abundance lies,
      Thy self thy foe, to thy sweet self too cruel:
      Thou that art now the world's fresh ornament,
      And only herald to the gaudy spring,
      Within thine own bud buriest thy content,
      And tender churl mak'st waste in niggarding:
        Pity the world, or else this glutton be,
        To eat the world's due, by the grave and thee.


                         2
      When forty winters shall besiege thy brow,
      And dig deep trenches in thy beauty's field,
      Thy youth's proud livery so gazed on now,
      Will be a tattered weed of small worth held:  
      Then being asked, where all thy beauty lies,
      Where all the treasure of thy lusty days;
      To say within thine own deep sunken eyes,
      Were an all-eating shame, and thriftless praise.
      How much more praise deserved thy beauty's use,
      If thou couldst answer 'This fair child of mine
      Shall sum my count, and make my old excuse'
      Proving his beauty by succession thine.
        This were to be new made when thou art old,
        And see thy blood warm when thou feel'st it cold.


                         3
      Look in thy glass and tell the face thou viewest,
      Now is the time that face should form another,
      Whose fresh repair if now thou not renewest,
      Thou dost beguile the world, unbless some mother.
      For where is she so fair whose uneared womb
      Disdains the tillage of thy husbandry?
      Or who is he so fond will be the tomb,
      Of his self-love to stop posterity?  
      Thou art thy mother's glass and she in thee
      Calls back the lovely April of her prime,
      So thou through windows of thine age shalt see,
      Despite of wrinkles this thy golden time.
        But if thou live remembered not to be,
        Die single and thine image dies with thee.

I want to parse it into chunks like this:

The first chunk should be:

From fairest creatures we desire increase,
That thereby beauty’s rose might never die,
But as the riper should by time decease,
His tender heir might bear his memory:
But thou contracted to thine own bright eyes,
Feed’st thy light’s flame with self-substantial fuel,
Making a famine where abundance lies,
Thy self thy foe, to thy sweet self too cruel:
Thou that art now the world’s fresh ornament,
And only herald to the gaudy spring,
Within thine own bud buriest thy content,
And tender churl mak’st waste in niggarding:
Pity the world, or else this glutton be,
To eat the world’s due, by the grave and thee.

The second:

When forty winters shall besiege thy brow,
And dig deep trenches in thy beauty’s field,
Thy youth’s proud livery so gazed on now,
Will be a tattered weed of small worth held:
Then being asked, where all thy beauty lies,
Where all the treasure of thy lusty days;
To say within thine own deep sunken eyes,
Were an all-eating shame, and thriftless praise.

The third:

How much more praise deserved thy beauty’s use,
If thou couldst answer ‘This fair child of mine
Shall sum my count, and make my old excuse’
Proving his beauty by succession thine.
This were to be new made when thou art old,
And see thy blood warm when thou feel’st it cold.

…and so on. Every time a sentence ends with . I want that part to be a new chunk.

How can I parse like this? I want some guidelines for a clear and efficient way to do this.
I do no want to go character by character and do some checking…

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-28T11:09:57+00:00Added an answer on May 28, 2026 at 11:09 am

    You could probably split it with something like:

    re.split(r"(?:^|(?:[^\S\n]*\n){2}(?m)^)[ \t]+\d+[ \t]+[\r\n]+", text)
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have this source code from 2001 that I would like to compile. It
So we have a photo like this (source: vkontakte.ru ) How to detect that
So I have Image like this (source: de-viz.ru ) I want to get something
So I have Image like this (source: de-viz.ru ) I want to get something
I have a 3 tables that look like this: (source: InsomniacGeek.com ) On the
I have a rather big number of source files that I need parse and
I want to parse the following statement using regex: (o) Multi line text (o)
I'm trying this source where jqGrid gets some json data from django: link Unfortunately
I want to make autocomlplete for remote data source, I get all data from
Consider this source: public partial class FormTest : Form { private Test test {

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.