Как выбрать текст используя регулярное выражение?

Необходимо получить весь текст, который будет начинаться с цифр включая последующие абзацы.

Хотелось бы получить следующий результат:
1 Contrary to popular belief, Lorem Ipsum is not simply random text.
     It has roots in a piece of classical Latin literature from 45 BC, making it over 2000 years old. 
  
  Richard McClintock, a Latin professor at Hampden-Sydney College in Virginia,
    looked up one of the more obscure Latin words,

  ...

2 Consectetur, from a Lorem Ipsum passage, and going through the 
  ...

N ...


Сам текст такого вида:

[Текст]
1 Contrary to popular belief, Lorem Ipsum is not simply random text.
    It has roots in a piece of classical Latin literature from 45 BC, making it over 2000 years old. 

    Richard McClintock, a Latin professor at Hampden-Sydney College in Virginia,
    looked up one of the more obscure Latin words,

    consectetur, from a Lorem Ipsum passage, and going through the 
    cites of the word in classical literature, discovered the undoubtable source.
    Lorem Ipsum comes from sections 1.10.32 and 1.10.33 of "de Finibus Bonorum et Malorum"
    (The Extremes of Good and Evil) by Cicero, written in 45 BC.

  [количество абзацев может быть переменным]

April 2016                                                                                Page 18

2 Consectetur, from a Lorem Ipsum passage, and going through the 
    It has roots in a piece of classical Latin literature from 45 BC, making it over 2000 years old. 

    Richard McClintock, a Latin professor at Hampden-Sydney College in Virginia,
    looked up one of the more obscure Latin words,

    Richard McClintock, a Latin professor at Hampden-Sydney College in Virginia,
    looked up one of the more obscure Latin words,  

  [количество абзацев может быть переменным]
[Текст]
  • Вопрос задан
  • 582 просмотра
Решения вопроса 1
Пригласить эксперта
Ваш ответ на вопрос

Войдите, чтобы написать ответ

Войти через центр авторизации
Похожие вопросы