|
Tarken Aurelius Apprentice
Joined: 23 Oct 2008 Posts: 120 Location: Cincinnati, Ohio
|
Posted: Mon Nov 16, 2009 3:16 am
Function like sscanf() in C |
I'm going to be doing some heavy CMUD testing, developing an AI chatbot using triggers and a response database. There was a function similar to sscanf() that CMUD had but I can't remember it for the life of me. Can someone possibly shed some light for me?
|
|
_________________ Tarken Aurelius, quality triggers since 2004! Trigger consulting since 2008! Content Developer at BatMUD (www.bat.org) |
|
|
|
orphean Apprentice
Joined: 21 Oct 2008 Posts: 147 Location: Olympia, WA
|
Posted: Mon Nov 16, 2009 4:59 am |
The only function that uses C style foof() codes would be %format() and that does pretty much the exact opposite of sscanf so isn't much help.
Your best bets are going to be %match() and %regex() which can store captured text into a variable. |
|
|
|
Tarken Aurelius Apprentice
Joined: 23 Oct 2008 Posts: 120 Location: Cincinnati, Ohio
|
Posted: Mon Nov 16, 2009 5:06 am |
Ah yeah %match was the one that I wanted. Does perfectly. Thanks!
|
|
_________________ Tarken Aurelius, quality triggers since 2004! Trigger consulting since 2008! Content Developer at BatMUD (www.bat.org) |
|
|
|
|
|