Hi mrityunjaynath,
When I run your code against this sample input, I get the output "the original quartus 9.1" and "the latest quartus 11.1" - so it would seem that the problem is happening elsewhere in your code.
To narrow down where the problem is occurring, sometimes the simplest thing to do is print debug output at strategic places in your code to monitor its progress, see also the Basic debugging checklist. Another option is stepping through your code with the debugger (tutorial).
Once you've narrowed down where your problem is occurring, boil down your code and sample input into a Short, Self Contained, Correct Example, that is, a piece of code that compiles and reproduces the problem, along with its sample input and the expected output vs. actual output including error messages (see also How do I post a question effectively?), and post it here.
Often this process will help you discover the bug and the fix too! :-)
Hope this helps,
-- Hauke D
In reply to Re^3: searching two pattern sequentially from one file
by haukex
in thread searching two pattern sequentially from one file
by mrityunjaynath
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |