Re: [Rails] RegEx help to detect First and Last name

2010-03-05 Thread Rick DeNatale
On Fri, Mar 5, 2010 at 12:16 PM, Hassan Schroeder wrote: > On Thu, Mar 4, 2010 at 10:53 PM, Allan Last wrote: > >> I run into problems where the name is close to the beginning of the >> sentence: >> Having John Smith over for dinner. --- This will look at "Having John" >> Getting Jane Smith ready

Re: [Rails] RegEx help to detect First and Last name

2010-03-05 Thread Hassan Schroeder
On Thu, Mar 4, 2010 at 10:53 PM, Allan Last wrote: > I run into problems where the name is close to the beginning of the > sentence: > Having John Smith over for dinner. --- This will look at "Having John" > Getting Jane Smith ready for school. --- This will look at "Getting > Jane" > > Do you kn

[Rails] RegEx help to detect First and Last name

2010-03-04 Thread Allan Last
Hello, I need some help on RegEx to detect First and Last names. This is what I currently have: /([A-Z]+[a-zA-Z]* [A-Z]+[a-zA-Z]*)/ This is used to detect a First and Last name where two words are next to each other that begin with a capital letter. So it will detect: John Smith Jane Smith I run