Page 1 of 1

Pattern match from beginning

Posted: Fri Mar 19, 2010 5:11 pm
by pakiyabhai
A. I would like to check for a pattern from BEGINNING of the line only, and then delete the line.
B. Add to A+ any empty spaces/lines above it.

I am able to capture By easily by just typing By in easy pattern , but it catches by in line 1 also. News 1 has three spaces between headline and reporter , while news 2 had only 2 spaces

Delete line with Mkhululi Mancotywa , and then subsequent spaces between by and heading











So my sample data looks like ,


" South African Corn Rises, Tracking Advances by U.S. Benchmark



By Mkhululi Mancotywa
March 16 (Bloomberg) -- Corn in South Africa, the largest
producer of the grain on the continent, rose as prices gained in
the U.S., which competes for export markets in Africa.
Corn for May delivery rose 0.5 percent in Chicago trading
today, advancing for the first time since March 3.

Brazil Soybean, Corn Prices at Paranagua for March 12 (Table)


By Terry Barrett
March 15 (Bloomberg) -- Following is a table detailing cas
prices for corn, soybeans and soybean products at Paranagua,
Brazil, according to Ary Oleofar in Sao Paulo. Prices for corn
are in dollars per metric ton. All other prices are expressed
as a basis, or difference, between spot supplies and Chicago
Board of Trade futures."

Re: Pattern match from beginning

Posted: Mon Mar 22, 2010 11:01 am
by DataMystic Support
Try the EasyPattern

Code: Select all

[ 0+ (cr, lf) ; blank lines
 lineStart, "Mkhululi Mancotywa"
]
Replace with blank.

Re: Pattern match from beginning

Posted: Mon Mar 22, 2010 3:01 pm
by pakiyabhai
thank you , but can you tell me what does cr and lf mean ?

also I won't have Mkhululi Mancotywa everytime , can I have something which can capture line start "BY" and then two words after that of any lengths ?

Re: Pattern match from beginning

Posted: Tue Mar 23, 2010 9:07 am
by DataMystic Support
Please purchase TextPipe Lite and I will be more than happy to answer this question for you.