Pattern match from beginning

Get help with installation and running here.

Moderators: DataMystic Support, Moderators

pakiyabhai
Posts: 8
Joined: Tue Feb 09, 2010 7:26 pm

Pattern match from beginning

Postby pakiyabhai » Fri Mar 19, 2010 5:11 pm

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."

User avatar
DataMystic Support
Site Admin
Posts: 2138
Joined: Mon Jun 30, 2003 12:32 pm
Location: Melbourne, Australia
Contact:

Re: Pattern match from beginning

Postby DataMystic Support » Mon Mar 22, 2010 11:01 am

Try the EasyPattern

Code: Select all

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


Replace with blank.
Regards,

Simon Carter, http://DataMystic.com/forums/index.php
http://PredictBGL.com - Insulin dose calculator for Type 1 diabetes
http://DownloadPipe.com - 250,000 free software downloads
http://DetachPipe.com - send huge email attachments

pakiyabhai
Posts: 8
Joined: Tue Feb 09, 2010 7:26 pm

Re: Pattern match from beginning

Postby pakiyabhai » Mon Mar 22, 2010 3:01 pm

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 ?

User avatar
DataMystic Support
Site Admin
Posts: 2138
Joined: Mon Jun 30, 2003 12:32 pm
Location: Melbourne, Australia
Contact:

Re: Pattern match from beginning

Postby DataMystic Support » Tue Mar 23, 2010 9:07 am

Please purchase TextPipe Lite and I will be more than happy to answer this question for you.
Regards,

Simon Carter, http://DataMystic.com/forums/index.php
http://PredictBGL.com - Insulin dose calculator for Type 1 diabetes
http://DownloadPipe.com - 250,000 free software downloads
http://DetachPipe.com - send huge email attachments


Return to “TextPipe Tips and Tricks, Questions and Support”

Who is online

Users browsing this forum: No registered users and 5 guests