Regular expression using C #

This is my input:

(l) b => 27:15 Rebekah dressed well her eldest son Esau, who was with her in the house and put their youngest son on Jacob: ^ p 27:16 And she laid the goats, goats, ^ p and on her smooth neck in her arms his; 27:17 and gave the meat; and the bread she prepared in the hand of her son Jacob.

Here ^ p is the input.

It should be added to the database as 27:15 contents on one line and 27:16 contents on the other ...

Using regex, I tried:

 var m = Regex.Match(line, @"\n\d+:"); if (m.Success) { html = html.Replace(m.Value, "</p>\n<p>" + m.Value); } 

My output is as follows:

 2 7:15 contents 

I want to save 27:15 contents .. I tried and get no answer.

+4
source share
3 answers

try it

 var m = Regex.Match(line, @"(( )?\d+:\d+)") 
0
source

I suggest you change the regex

 var m = Regex.Match(line, @"\d+:\d+") 

He will return you 27:15

0
source

Use the following regular expression

 (\d+:\d+)* 

You can test the result on this site.

Regex pal

0
source

All Articles