Newcomers

This is a forum for newcomers to the Personality Forge. Many questions can be answered by reading the Book of AI and the FAQ under the "My Bots" link in the upper corner.

Posts 3,850 - 3,861 of 8,132
Many questions are answered in the FAQ.


18 years ago #3850
Hi everyone.

In certain situations I would like my bot to follow a certain sequence, as long as the reply is not a question. So it would be "xnomatch" unless there's a question mark in the reply.

So, is there a way to let a Seek check whether the reply contains a question mark?

Cheers.


18 years ago #3851
That can be done with AIScript. Talk to psimagus about it.

18 years ago #3852
I don't have seeks but I have used these regexs..

^indeed [ !| ?| .]$ (re)

^do you [?] $ (re)

^do you [!] $ (re)

([ . .])([ .]+)$ (re)

([?]+)$ (re)


I don't see why something like that wouldn't work as a seek.

18 years ago #3853
Thanks for the feedback. I'll try that out.

18 years ago #3854
No need for AIScript - a simple regex should do it. [?] (re) should work as a seek to match any user input with a question mark in. And then xnomatch to match everything else.

18 years ago #3855
I tried (gossipname2) but it doesn't work. What do I do?

18 years ago #3856
You can use (friend) or (enemy) to get another random name to come up. I think (friend2) and (enemy2) work as well.

18 years ago #3857
The Book of A.I. contains a link ([1]) to a tutorial on regular expresssions. Unfortunately the link is dead.
:-(
[1] http://www.textartisan.com/articles/regex.html

18 years ago #3858
psimagus has a great link for regexs...I just can't find it right now..Can anyone else remember the link?

18 years ago #3859
I FOUND IT

http://www.regular-expressions.info/

18 years ago #3860
Thanks prob. This site would not be the same without you.
Wikipedia has a good page on regex too.
http://en.wikipedia.org/wiki/Regular_expression

18 years ago #3861
bear in mind that the Forge's flavour of regex is slightly different from that described @ http://www.regular-expressions.info/ (or anywhere else.) You may need to tinker, and some of the advanced flagging and spanning options don't work.


Posts 3,850 - 3,861 of 8,132

» More new posts: Doghead's Cosmic Bar