Im looking for a regex expression that would enable me to match a pattern only before the first \n of a line. So for example if I had text
if $\ = $$ and had text
123 DFG\n (1st line)
$$
345\n
3678 DSGDFG\n
678TY&^*\n
(all 2nd line because of $\ = $$)
$$
789DHYUTN\n
345345 SDFGDFG \n
(3rd line)
So I would need a search that would search only the text containing "345", " 123 DFG", and "786 ... " since they are all before the first \n of their respective lines. This is only an example to illustrate what I am having trouble with.
if $\ = $$ and had text
123 DFG\n (1st line)
$$
345\n
3678 DSGDFG\n
678TY&^*\n
(all 2nd line because of $\ = $$)
$$
789DHYUTN\n
345345 SDFGDFG \n
(3rd line)
So I would need a search that would search only the text containing "345", " 123 DFG", and "786 ... " since they are all before the first \n of their respective lines. This is only an example to illustrate what I am having trouble with.
Comment