Find/Replace Goes Past Line End
Posted: Mon Jul 15, 2013 8:18 pm
I'm editing a text file - all lines end in 0D0A. Snippit of file is found below. I'm using Regular Expressions in TP 7.0.9.
I'm looking for lines with "m." followed by text and ";" in them. My find expression is ([^m\.]*)m\.([^;]*);(.*)\R (I've tried with and without "\R")
At line7, I expected the find to fail (no ";" before EOL) and move on - but it 'sees' the "m." and finds ";" in the next line! Obviously, I'm missing something. Can anyone identify?
sp:;Dorothy;b.Apr 1812;m.8 Sep 1828;d.4 May 1897)
2.;John;b.Abt 1831;d.Apr/Jun 1898)
sp:;Elizabeth;b.Abt 1830;m.10 Dec 1854;d.1907)
3.;Isabella;Wigham;b.Abt 1856)
4.;Margaret;Ann Hughes;b.Abt 1893)
4.;Harriett;Hughes;b.Abt 1897)
sp:;John;Lawson;m.Jan/Mar 1875)
4.;Elizabeth;Lawson;b.Abt 1876)
4.;Sarah;J. Lawson;b.Abt 1877)
3.;Sarah;Jane Wigham;b.Oct/Dec 1858;d.1941)
sp:;George;William Stoker;b.Abt 1857;m.Jan/Mar 1876;d.1891/1901)
4.;Elizabeth;Stoker;b.Abt 1878)
I'm looking for lines with "m." followed by text and ";" in them. My find expression is ([^m\.]*)m\.([^;]*);(.*)\R (I've tried with and without "\R")
At line7, I expected the find to fail (no ";" before EOL) and move on - but it 'sees' the "m." and finds ";" in the next line! Obviously, I'm missing something. Can anyone identify?
sp:;Dorothy;b.Apr 1812;m.8 Sep 1828;d.4 May 1897)
2.;John;b.Abt 1831;d.Apr/Jun 1898)
sp:;Elizabeth;b.Abt 1830;m.10 Dec 1854;d.1907)
3.;Isabella;Wigham;b.Abt 1856)
4.;Margaret;Ann Hughes;b.Abt 1893)
4.;Harriett;Hughes;b.Abt 1897)
sp:;John;Lawson;m.Jan/Mar 1875)
4.;Elizabeth;Lawson;b.Abt 1876)
4.;Sarah;J. Lawson;b.Abt 1877)
3.;Sarah;Jane Wigham;b.Oct/Dec 1858;d.1941)
sp:;George;William Stoker;b.Abt 1857;m.Jan/Mar 1876;d.1891/1901)
4.;Elizabeth;Stoker;b.Abt 1878)