Using regex (PHP) how to limit the search to a text group?

Asked

Viewed 36 times

0

Considering the text hypothesis (with and without separation by paragraphs - for each group whose content is repeated):

group1, Tiago, ball, spring, brick, peter, ball, spring, brick, Raimundo, ball, spring, brick, Joao, ball, spring, brick,

Grupo2, Ball, ball, spring, brick, peter, ball, spring, brick,

group 3, Ball, ball, spring, brick, peter, ball, spring, brick,

group4, Ball, ball, spring, brick, peter, ball, spring, brick,

group5, Ball, ball, spring, brick, peter, ball, spring, brick,

Using regex (PHP) how to limit the search to what is between group3 and group4 so that my departure will be in subgroups of people:

Tiago ball spring brick

peter spring brick ball

Raimundo ball spring brick

Joao ball spring brick

Felipe brick spring ball

  • I didn’t get it right... just from group 3 you want to remove the commas, that’s it?

  • @Leonogueira, I edited to try to clarify the question.

  • This question was answered on: https://stackoverflow.com/questions/46820143/regex-php-how-to-limit-variable-search-to-a-single-paragraph/46826042#46826042

No answers

Browser other questions tagged

You are not signed in. Login or sign up in order to post.