Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Searching for Names in o long document

Status
Not open for further replies.

ktmark

Technical User
Mar 22, 2007
5
SE
How do I use RegEx to find all persons names in a document? I look for a code that finds two words right after each other with a blank in between, and each starting with ON Versal.
I tried <([A-Z][a-z]*)>"blank" and found one Word, but doubling it didn't work. Any suggestion?
Mark
 
I'm not sure I understand what you mean. Can you give some examples?

Steve

[small]"Every program can be reduced by one instruction, and every program has at least one bug. Therefore, any program can be reduced to one instruction which doesn't work." (Object::perlDesignPatterns)[/small]
 
I have no idea what you mean by ON Versal but to find two consecutive, single-space-separated words both beginning with an upper case letter you can use ...

[blue][tt]<[A-Z][a-z]@ [A-Z][a-z]@>[/tt][/blue]

... and check Use Wildcards



Enjoy,
Tony

------------------------------------------------------------------------------------
We want to help you; help us to do it by reading this: Before you ask a question.

Professional Office Developers Association
 
Sorry, I'm not so good at English :(
I'm looking for two words both beginning with ONE upper case letter
Mark
 
Hi again
Tony, it works!! Thanks a lot!
How did you know you should use "@"?
I tried the joker-sign *, but it didn't work properly.
And thanks to all others for your efforts!
Mark
 
ktmark said:
How did you know you should use "@"?

Too many hours spent with it [lol]

The asterisk ("*") looks for any characters and won't usually stop where you want it to - the at-sign ("@") looks only for further occurrences of the previous term (this time, [a-z], lower case letters) so stops at a space (first word) or end of word (">") (second word)

Enjoy,
Tony

------------------------------------------------------------------------------------
We want to help you; help us to do it by reading this: Before you ask a question.

Professional Office Developers Association
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top