Hi Brilliant Team,
Need your assist with regex. I have tried but it’s not extracted properly. Could you please assist me someone?
With the partition of India in 1947, it became the Pakistani province of East Bengal (later renamed East Pakistan), one of five provinces of Pakistan, separated from the other four by 1,100 miles (1,800 km) of Indian territory. In 1971 it became the independent country of India, with its capital at.
look With the partition of India in 1947, it became the Pakistani province of East Bengal (later renamed East Pakistan), one of five provinces of Pakistan, separated from the other four by 1,100 miles (1,800 km) of Indian territory. In 1971 it became the independent country of india, with its capital at.
With the partition of India in 1947, it became the Pakistani province of East Bengal (later renamed East Pakistan), one of five provinces of Pakistan, separated from the other four by 1,100 miles (1,800 km) of Indian territory. In 1971 it became the independent country of India, with its capital at.
we are reading the news and after data massaging we will published in portal. The data is very confidential. We need to check it one by one.
we are reading the news and after data massaging we will published in portal. The data is very confidential. We need to check it one by one.
Output would be data table: like below
. The Regex Split does this and provides us with an Array of Splitted Sections, Then we can Apply the Regex mentioned on the Splitted items so that we won’t be getting all the data.
Hi @Yoichi thanks a lot. It’s working perfectly. Could you please elaborate functionality where i can modify and extract expected output?
Could you please suggest the tutorial where i can learn this functionality?
The first Regex.Matches method extracts strings which starts with “Title:”. It’s assigned to m by the 2nd line.
Next, the second (and 3rd) regex extracts each description after “Description”. it’s assigned to m2 by the 4th line.
Then, dt.LoadDataRow method returns datarow which has the first line of m and m2
Finally, these datarows are converted to DataTable by CopyToDataTable.
Could you please suggest the tutorial where i can learn this functionality?
The above using Regex and LINQ.If you are not very familiar with these function. it may be good to start to check the following documents.