Got more questions? Find advice on: ASP | SQL | XML | Windows
in Search
Welcome to RegexAdvice Sign in | Join | Help

i need to recognize two words and one letter in a middle from input how to do it with regex ?

Last post 05-15-2008, 12:06 PM by Lyndar. 1 replies.
Sort Posts: Previous Next
  •  05-15-2008, 11:48 AM 42312

    i need to recognize two words and one letter in a middle from input how to do it with regex ?

    Hello,

     Thanks for all help in advance.

    I'm coding with PHP and i need to recognize 2 words and one letter in a middle from input. I mean i have a variable with string and i know what that string must be formated like 2 words and one letter in a middle. "hello8 g mike213" this is correct string. no "hello~8 8 asud+2"

     

    can someone give any help on this. thanks.
     

    Filed under: ,
  •  05-15-2008, 12:06 PM 42313 in reply to 42312

    Re: i need to recognize two words and one letter in a middle from input how to do it with regex ?

    \w+\s+[a-z]\s+\w+

     

    This matches on:

    [one or more alphanumeric characters][one or more whitespace characters][one letter][one or more whitespace characters][one or more alphanumeric characters]

View as RSS news feed in XML