Sarnia
Sarnia

Reputation: 1

finding a string in a large text and return the paragraph which the string is in that paragraph

Hi I wanna search a string in a large text and return the paragraph which involve the string. (In Python)

Here is the example of the data that need to be searched:

https://raw.githubusercontent.com/obophenotype/human-phenotype-ontology/master/hp.obo

In this example I want to search for the string 'chest pain' and there are paragraphs involving it. How I code to get the whole paragraph starting at [TERM] and ending at the beginning of next [TERM]

Upvotes: 0

Views: 435

Answers (0)

Related Questions