### Description

This was flagged by @romseygeek in https://github.com/elastic/elasticsearch/pull/95558#discussion_r1177625654 to be targeted for a new issue.

In dynamic_template mappings, 'simple' match types (which is the default setting) will happily accept regexes (rather than simple wildcards) without error or warning, but then they will not work as the user likely intended. We should emit a warning if the user provides a pattern that 'looks like' a regex, but haven't explicitly set match_type.

---- 

Deeper context: 

The validate method in DynamicTemplate.parse tries to catch these, but it only catches the invalid pattern when match_pattern=regex. For example, see the test: https://github.com/elastic/elasticsearch/blob/main/server/src/test/java/org/elasticsearch/index/mapper/DynamicTemplateParseTests.java#L132

Current behavior is:

```
  "mappings": {
    "dynamic_templates": [
      {
        "mytemplate": {
          "match_pattern": "regex",
          "match": "*name",
          "unmatch": "*middle",
          "mapping": {
            "type": "keyword"
          }
        }
      }
    ]
  }
```
fails with:
```
    "type": "mapper_parsing_exception",
    "reason": "Failed to parse mapping: Pattern [*name] of type [regex] is invalid. Cannot create dynamic template [mytemplate].",\
```
but:

```
      {
        "mytemplate": {
          "match": ".*name$",
          "unmatch": "^.*middle.*",
          "mapping": {
            "type": "keyword"
          }
        }
      }
```
(where  `"match_pattern": "simple"` is implied) works with no problems (until you try to actually put documents in with the mapping, of course).

We could probably add a method to Regex.java. There is already this function

```
   public static boolean isSimpleMatchPattern(String str) {
        return str.indexOf('*') != -1;
    }
```
but that's not enough for this scenario.

[This code](https://github.com/elastic/elasticsearch/blob/main/server/src/main/java/org/elasticsearch/common/regex/Regex.java#L133) indicates that the only allowed patterns for "simple" are "xxx*", "*xxx", "*xxx*" and "xxx*yyy", so we could check for things like .* and ^xxx and yyy$ and chars like [, ] and | and maybe parens and then run it through [REGEX.matches()](https://github.com/elastic/elasticsearch/blob/main/server/src/main/java/org/elasticsearch/index/mapper/DynamicTemplate.java#L40) and if that does NOT fail, then it appears to be a valid actual regex, not a simple pattern and then give a warning to users.
server/src/main/java/org/elasticsearch/index/mapper/DynamicTemplate.java
* Returns true if the field type supported as runtime field, false otherwise.
         * Whenever a match_mapping_type has not been defined in a dynamic template, if a runtime mapping has been specified only
         * field types that are supported as runtime field will match the template.
         * Also, it is not possible to define a dynamic template that defines a runtime field and explicitly matches a type that
         * is not supported as runtime field.
         */
        boolean supportsRuntimeField() {
            return true;
        }
        @Override
        public final String toString() {
            return name().toLowerCase(Locale.ROOT);
        }
    }
    @SuppressWarnings("unchecked")
    static DynamicTemplate parse(String name, Map<String, Object> conf) throws MapperParsingException {
        List<String> match = new ArrayList<>(4); 
        List<String> pathMatch = new ArrayList<>(4);
        List<String> unmatch = new ArrayList<>(4);
        List<String> pathUnmatch = new ArrayList<>(4);
        Map<String, Object> mapping = null;
        boolean runtime = false;
        String matchMappingType = null;
        String matchPattern = MatchType.SIMPLE.toString();
        for (Map.Entry<String, Object> entry : conf.entrySet()) {
            String propName = entry.getKey();
            if ("match".equals(propName)) {
                addEntriesToPatternList(match, propName, entry);
            } else if ("path_match".equals(propName)) {
                addEntriesToPatternList(pathMatch, propName, entry);