Как правильно обрабатывать фокус детей в JavaFX?

Вы можете использовать следующее выражение с режимом без учета регистра:

\b((?:[a-z]+\S*\d+|\d\S*[a-z]+)[a-z\d_-]*)\b

Объяснение:

\b                   # Assert position at a word boundary
(                    # Beginning of capturing group 1
  (?:                # Beginning of the non-capturing group
    [a-z]+\S*\d+     # Match letters followed by numbers
    |                # OR
    \d+\S*[a-z]+     # Match numbers followed by letters
  )                  # End of the group
  [a-z\d_-]*         # Match letter, digit, '_', or '-' 0 or more times
)                    # End of capturing group 1
\b                   # Assert position at a word boundary

Regex101 Demo

0
задан Küroro 13 July 2018 в 13:32
поделиться