code: protected int convertMatchFlags(Element opts) {
  		int flags = 0;
  
  		String sopts = ((StringProperty) opts).getValue();
  
  		for (int i = 0; i < sopts.length(); i++) {
  			char c = sopts.charAt(i);
  			switch (c) {
  			case 'i':
  				flags |= Pattern.CASE_INSENSITIVE;
  				break;
  			case 's':
  				flags |= Pattern.DOTALL;
  				break;
  			case 'm':
  				flags |= Pattern.MULTILINE;
  				break;
  			case 'u':
  				flags |= Pattern.UNICODE_CASE;
  				break;
  			case 'x':
  				flags |= Pattern.COMMENTS;
  				break;
  			default:
  				throw EvaluationException.create(sourceRange,
  						MSG_INVALID_REGEXP_FLAG, c);
  			}
  		}
  
  		return flags;
  	}
docs: A utility function to convert a string containing match options to the
  associated integer with the appropriate bits set.
  
  @param opts
  string containing matching flags
  @return integer with appropriate bits set