Why doesn't this work?
Posted: Mon Sep 30, 2013 1:05 pm
Hi,
I need to keep the first word of every line, but, remove anything thereafter. I need to do this for each line of a 150 line file.
I'm searching for this:
^(.*$)(.*)$
I'm replacing with this:
\1
When I run this, it's removing everything. I'm left with blankness. Interestingly, in version 5 of Textpad, which I had until a few minutes ago, it simply replaced every line with itself. It didn't remove anything. But, now, with version 7, it's removing everything. Whatever. I just want it to keep the first parenthetical expression. Why doesn't it?
Thanks,
Peter
I need to keep the first word of every line, but, remove anything thereafter. I need to do this for each line of a 150 line file.
I'm searching for this:
^(.*$)(.*)$
I'm replacing with this:
\1
When I run this, it's removing everything. I'm left with blankness. Interestingly, in version 5 of Textpad, which I had until a few minutes ago, it simply replaced every line with itself. It didn't remove anything. But, now, with version 7, it's removing everything. Whatever. I just want it to keep the first parenthetical expression. Why doesn't it?
Thanks,
Peter