in reply to Re: Regex problem
in thread Regex problem

This node falls below the community's threshold of quality. You may see it by logging in.

Replies are listed 'Best First'.
Re^3: Regex problem
by ikegami (Patriarch) on Dec 20, 2008 at 09:36 UTC
    It shouldn't be a surprise since you changed the file format after I posted my reply. You initially said File2.txt looked like
    12345 ABCDEFANABCDEFGHIJKLMNOPQRSTVVWXWZ 67890 ABACFHAYJAYAFANJAKALAHUSSGSJISUSSKSOWUWSLSS
      Dear Monk one more problem is coming... The program is printing the 3 word size only just after the FAN word not talking care of the position in the File 1. Example in the second case 67890 the position is 21 but the output is printing JAK instead of ALA. That means its printing position just next to FAN always instead of the original position

        I think the program is doing what you described, but I did find your description a bit difficult to understand. It might help to clarify your requirements if you answered the following questions.

        Do you want the text at the position indicated in file1 or do you want the text after the string "FAN"?

        If you want the text at the position indicated in file1 rather than the text after the string "FAN", why do you want to search for the string "FAN"?

      Thanks for the help ;)