ngOptions in <select> does not support free-style code #5602
Description
As of 1.2.6, the parser accepts multiline string in ng-repeat. However, the same does not exist for ng-options in elements. The current regex for matching ng-options is: var NG_OPTIONS_REGEXP = /^\s*(.*?)(?:\s+as\s+(.*?))?(?:\s+group\s+by\s+(.*))?\s+for\s+(?:([\$\w][\$\w]*)|(?:\(\s*([\$\w][\$\w]*)\s*,\s*([\$\w][\$\w]*)\s*\)))\s+in\s+(.*?)(?:\s+track\s+by\s+(.*?))?$/ Following the same pattern to fix #5000, the new regex could be: var NG_OPTIONS_REGEXP = /^\s*(.*?)(?:\s+as\s+(.*?))?(?:\s+group\s+by\s+(.*))?\s+for\s+(?:([\$\w][\$\w]*)|(?:\(\s*([\$\w][\$\w]*)\s*,\s*([\$\w][\$\w]*)\s*\)))\s+in\s+([\r\n\s\S]*?)(?:\s+track\s+by\s+(.*?))?$/ In the above, [\r\n\s\S] is added after in\s+(, replacing the . there. However, I have not tested the above change. There may be other elements that also support iteration and don't allow multiline strings that I missed too.