Click here to Skip to main content
15,884,975 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Given below is my text file so i want to read name,birth date, time,..........so on
plz help me





Name: Sunil K A Prepared By: Revd. Father Dr. Augusto ³
³ Birth Date: 03/28/1971 Weekday: Sunday ³
³ Time: 18:12:00 GMT: 12:42:00 ³
³ Time Zone: 5:30 East TZ Name: Indian Standard Time ³
³ Latitude: 12ø59'00" North Location: Bangalore, India ³
³ Longitude: 77ø35'00" East Ayanamsa: Lahiri 23ø27'29" ³
³ ³
³ Rasi Angle and Sign Naks., Lords, Pada, Sound Velocity ³
³ ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ ÄÄÄÄÄÄÄÄ ³
³Ascendant: 9ø52'22" Virgo U.Phalguni Su/Ve/Ke 4 PI 1.00 ³
³ Sun: 13ø44'13" Pisces U. Bhadra Sa/Ra/Sa 4 THA 0.99 ³
³ Moon: 8ø03'05" Aries Aswini Ke/Ju/Sa 3 CHO 1.12 ³
³ Mercury: 1ø55'38" Aries Aswini Ke/Ve/Ju 1 CHU 1.31 ³
³ Venus: 5ø17'55" Aquarius Dhanishta Ma/Su/Sa 4 GAY 1.19 ³
³ Mars: 16ø11'26" Sagittarius P. Ashada Ve/Su/Ve 1 BU 1.09 ³
³ Jupiter: 12ø57'17" Rx Scorpio Anuradha Sa/Ra/Ra 3 NU -0.19 ³
³ Saturn: 26ø24'03" Aries Bharini Ve/Ke/Ju 4 LO 3.20 ³
³ Rahu: 29ø20'16" Rx Capricorn Dhanishta Ma/Sa/Ma 2 GL -2.33 ³
³ Ketu: 29ø20'16" Rx Cancer Aslesha Me/Sa/Ma 4 DO -2.33 ³
ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÙ

ÚÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÂÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÂÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÂÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ¿
³7th Pisces ³8th Aries ³9th Taurus ³10th Gemini ³
³ Sun 13ø44' ³ Mercury 1ø56' ³ ³ ³
³ ³ Moon 8ø03' ³ ³ ³
³ ³ Saturn 26ø24' ³ ³ ³
ÃÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÁÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ´
³6th Aquarius ³ ³11th Cancer ³
³ Venus 5ø18' ³ ³ Ketu Rx 29ø20'³
³ ³ ³ ³
³ ³ Rasi Chart ³ ³
ÃÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ´ for ÃÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ´
³5th Capricorn ³ Sunil K A ³12th Leo ³
³ Rahu Rx 29ø20' ³ ³ ³
³ ³ ³ ³
³ ³ ³ ³
ÃÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÂÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ´
³4th Sagittarius ³3rd Scorpio ³2nd Libra ³1st Virgo ³
³ Mars 16ø11' ³ Jupiter Rx 12ø57' ³ ³ Ascendant 9ø52'³
³ ³ ³ ³ ³
³ ³ ³ ³ ³
ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÁÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÁÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÁÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÙ
Posted

Use this method :

C#
private int pos = 0;
public void Find(string str)
        {
            try
            {
                int start = YourTextFile.Text.IndexOf(str, pos);
                int str_length = str.Length;

                textarea.Select(start, str_length);
                textarea.Focus();

                pos = start + str_length;
            }
            catch (Exception e)
            {
                e.ToString();
                MessageBox.Show("Reached End of Document", "", MessageBoxButtons.OK, MessageBoxIcon.Asterisk);
                pos = 0;
            }
         }  
 
Share this answer
 
You should use a Regex
MSDN
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900