Hi @adeelaslam
Below is the thread which will give you overview for how to use Matches Activity which is used for applying regular Expressions :-
And Inside the file if you have to fix Line Number then 1st of all i should have a look around that what all Data/1st Two lines consist of and what pattern they follow
So for that u have to provide me the input Data within the file for the same
Happy Automation
Best Regards
Er Pratik Wavhal