// Numbas version: exam_results_page_options {"name": "Random strings with randexp", "extensions": ["randexp"], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "question_groups": [{"pickingStrategy": "all-ordered", "questions": [{"showQuestionGroupNames": false, "variablesTest": {"maxRuns": 100, "condition": ""}, "variables": {"city1": {"description": "", "templateType": "anything", "group": "Ungrouped variables", "name": "city1", "definition": "cityname()"}, "city2": {"description": "", "templateType": "anything", "group": "Ungrouped variables", "name": "city2", "definition": "cityname()"}, "company_name": {"description": "", "templateType": "anything", "group": "Ungrouped variables", "name": "company_name", "definition": "randexp('(International|Agglomerated|Combined) (Steel|Wool|Widget) (Lifting|Bending|Handling) (Industries|Services)(, (Ltd\\\\.|Co\\\\.|Inc\\\\.))?')"}}, "parts": [], "variable_groups": [], "ungrouped_variables": ["city2", "city1", "company_name"], "name": "Random strings with randexp", "rulesets": {}, "metadata": {"description": "

The function randexp, provided by an extension, generates a random string matching the given regular expression.

", "licence": "Creative Commons Attribution 4.0 International", "notes": ""}, "tags": ["demo"], "type": "question", "preamble": {"js": "", "css": ""}, "functions": {"cityname": {"type": "string", "parameters": [], "language": "jme", "definition": "capitalise(randexp('[rtsdfghlcbnm]([aeiou]([rtsdfghlcbnm]|tt|ss|ff))([aeiou]([rtsdfghlcbnm]))?(ford|shire|ton|ville|bury|castle|land)'))"}}, "advice": "", "question_groups": [{"pickingStrategy": "all-ordered", "questions": [], "name": "", "pickQuestions": 0}], "statement": "

{company_name} is based in {city1}. You are a trader from {city2}.

", "contributors": [{"name": "Christian Lawson-Perfect", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/7/"}]}]}], "contributors": [{"name": "Christian Lawson-Perfect", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/7/"}]}