Web Wiz - Green Windows Web Hosting

  New Posts New Posts RSS Feed - Filter wild word
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Filter wild word

 Post Reply Post Reply
Author
Aumuz View Drop Down
Groupie
Groupie
Avatar

Joined: 14 March 2003
Location: United States
Status: Offline
Points: 43
Post Options Post Options   Thanks (0) Thanks(0)   Quote Aumuz Quote  Post ReplyReply Direct Link To This Post Topic: Filter wild word
    Posted: 18 August 2003 at 10:16pm

"my name is Phillip"

Can anyone help me make some code to filter the above sentence.

What I wan't it to do is, reconize the words "my name is" and then set a string (EX: str_username) to that (so str_username="Phillip").

Can anyone help me on this?

Back to Top
b_bonnett View Drop Down
Mod Builder Group
Mod Builder Group


Joined: 16 April 2003
Location: New Zealand
Status: Offline
Points: 275
Post Options Post Options   Thanks (0) Thanks(0)   Quote b_bonnett Quote  Post ReplyReply Direct Link To This Post Posted: 19 August 2003 at 4:49am

Try the following:

intStart = InStr(strToSearch,  "my name is")
If intStart > 0 Then
  intStart = intStart + 11
  intEnd = InStr(intStart, strToSearch, " ")
  strUsername = Mid(strToSearch, intStart, intEnd)
End If

This is written off the top of my head, so you might need to play around with the numbers to get it working correctly.

Blair

Webmaster, The Plane Gallery
Greetings From Christchurch
Back to Top
Aumuz View Drop Down
Groupie
Groupie
Avatar

Joined: 14 March 2003
Location: United States
Status: Offline
Points: 43
Post Options Post Options   Thanks (0) Thanks(0)   Quote Aumuz Quote  Post ReplyReply Direct Link To This Post Posted: 19 August 2003 at 7:44am

Ok, thanks!

(I can't get it to work yet, but I will play around with it.)

By the way, in case anyones curious, I am using this to make a faq/forum/chat bot. And this is definetly going to cut down on "brain" (a access database) space... Otherwise I need to enter every possible sentece myself, and the bot would have no learning capabilities...

So thanks for your help!

Back to Top
b_bonnett View Drop Down
Mod Builder Group
Mod Builder Group


Joined: 16 April 2003
Location: New Zealand
Status: Offline
Points: 275
Post Options Post Options   Thanks (0) Thanks(0)   Quote b_bonnett Quote  Post ReplyReply Direct Link To This Post Posted: 20 August 2003 at 4:11am

I think changing intStart = intStart + 11 to intStart = intStart + 12 would fix it.

Blair

Webmaster, The Plane Gallery
Greetings From Christchurch
Back to Top
Aumuz View Drop Down
Groupie
Groupie
Avatar

Joined: 14 March 2003
Location: United States
Status: Offline
Points: 43
Post Options Post Options   Thanks (0) Thanks(0)   Quote Aumuz Quote  Post ReplyReply Direct Link To This Post Posted: 27 August 2003 at 8:39am

(oops! sorry I forgot about this...)

I will try that out once I get a chance...

More less just wanted to say thanks for you help.

Cheers!
Aumuz.

visit me at my homepage www.oursaintann.com
Back to Top
 Post Reply Post Reply

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.08
Copyright ©2001-2026 Web Wiz Ltd.


Become a Fan on Facebook Follow us on X Connect with us on LinkedIn Web Wiz Blogs
About Web Wiz | Contact Web Wiz | Terms & Conditions | Cookies | Privacy Notice

Web Wiz is the trading name of Web Wiz Ltd. Company registration No. 05977755. Registered in England and Wales.
Registered office: Web Wiz Ltd, Unit 18, The Glenmore Centre, Fancy Road, Poole, Dorset, BH12 4FB, UK.

Prices exclude VAT at 20% unless otherwise stated. VAT No. GB988999105 - $, € prices shown as a guideline only.

Copyright ©2001-2026 Web Wiz Ltd. All rights reserved.