Back
Login
Register
Login
Register
Millisecond Forums
Home
»
Millisecond Forums
»
Inquisit 5
»
validresponse regular expressions
validresponse regular expressions
Post Reply
Like
69
validresponse regular expressions
View
Flat Ascending
Flat Descending
Threaded
Options
Subscribe to topic
Print This Topic
RSS Feed
Goto Topics Forum
Author
Message
lwise
lwise
posted 8 Years Ago
ANSWER
Post Details
Share Post
Group: Forum Members
Posts: 10,
Visits: 28
Perfect
Thanks so much for your prompt response
Lisa
Reply
Like
77
Dave
Dave
posted 8 Years Ago
ANSWER
Post Details
Share Post
Group: Administrators
Posts: 13K,
Visits: 105K
+
x
Dave - Tuesday, March 7, 2017
+
x
lwise - Tuesday, March 7, 2017
I'm looking for an easy easy syntax to specify a valid response for any combination of four x's and four o's (i.e. an 8 letter string containing exactly four x and o in any pattern, without iterating through the possible patterns.
Thanks
Lisa
You can specify a regular expression to match that pattern via an <openended>'s /mask attribute.
Alternatively, you can achieve a similar effect using /isvalidresponse and a couple of string functions:
<openended myopended>
/ charlimit = 8
/ isvalidresponse = [
length(replaceall(tolower(openended.myopended.response), "x","")) == 4 &&
length(replaceall(tolower(openended.myopended.response), "o","")) == 4
]
</openended>
Reply
Like
44
Dave
Dave
posted 8 Years Ago
ANSWER
Post Details
Share Post
Group: Administrators
Posts: 13K,
Visits: 105K
+
x
lwise - Tuesday, March 7, 2017
I'm looking for an easy easy syntax to specify a valid response for any combination of four x's and four o's (i.e. an 8 letter string containing exactly four x and o in any pattern, without iterating through the possible patterns.
Thanks
Lisa
You can specify a regular expression to match that pattern via an <openended>'s /mask attribute.
Reply
Like
34
lwise
lwise
posted 8 Years Ago
ANSWER
Topic Details
Share Topic
Group: Forum Members
Posts: 10,
Visits: 28
I'm looking for an easy easy syntax to specify a valid response for any combination of four x's and four o's (i.e. an 8 letter string containing exactly four x and o in any pattern, without iterating through the possible patterns.
Thanks
Lisa
Reply
Like
69
GO
Merge Selected
Merge into selected topic...
Merge into merge target...
Merge into a specific topic ID...
Open Merge
Post Reply
Like
69
Post Quoted Reply
Reading This Topic
Login
Login
Remember Me
Reset Password
Resend Validation Email
Login
Facebook
Explore
Messages
Mentions
Search