Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Extracting names from a text file

26 views
Skip to first unread message

Charlie Hoffpauir

unread,
Dec 3, 2015, 2:31:08 PM12/3/15
to
I'm trying to create an index for an old genealogy text. I have the
text in electronic form (OCR'd and corrected)and I need a way to
extract the names to another file to create a concordance file, from
which I can then create an index in Word. I bought a book on
Powershell, and it looks like that would do it, but it will take a
very long time for me to learn "how" to do it. What I need is
something that would simply copy every word that begins with an
uppercase letter to another file. With that done, I could then delete
everything not a name, and create the concordance. Is there an easy
way to do that extraction?

Jürgen Exner

unread,
Dec 3, 2015, 9:41:13 PM12/3/15
to
On Thu, 03 Dec 2015 13:30:57 -0600, Charlie Hoffpauir
<inv...@invalid.com> wrote in microsoft.public.windows.powershell:
Get-Content .\MyGenealogy.txt | %{-split $_} | ?{[char]::IsUpper($_[0])}

jue

Charlie Hoffpauir

unread,
Dec 4, 2015, 12:11:17 PM12/4/15
to
Outstanding! It's exactly what I was looking for. At 76 I try to avoid
getting into anything that requires a long learning process, but this
Powershell looks really useful.

Thanks very much for your help!

Charlie Hoffpauir

unread,
Dec 5, 2015, 11:34:24 AM12/5/15
to
On Fri, 04 Dec 2015 19:59:27 -0500, Special Access
<nonyab...@hotmail.com> wrote:

>On Fri, 04 Dec 2015 11:10:43 -0600, Charlie Hoffpauir
><inv...@invalid.com> wrote:
>
><SNIP>
>
>>Outstanding! It's exactly what I was looking for. At 76 I try to avoid
>>getting into anything that requires a long learning process, but this
>>Powershell looks really useful.
>>
>>Thanks very much for your help!
>
>In that light, I would recommend a book called "Learn PowerShell in a
>month of lunches" by Don Jones and Jeffrey Hicks. Easy read, each
>lesson builds on the previous one, and I'm sure you can find it
>electroncially somewhere cheap
>
>Mike

Thanks for the suggestion, my copy is on the way, due Monday.
0 new messages