Your task description has a serious problem:
alphanumeric means consisting of
alphabetic
or numeric characters. This is true for all space separated sequences of characters in your example.
A case-insensitive regular expression search with any regexp engine with search string
[a-z]+ and with
Match Whole Word enabled finds just words consisting of alphabetic characters in ASCII ranges A-Za-z. As macro code:
A case-insensitive Perl regular expression search with search string
(?:[a-z]+[0-9]|[0-9]+[a-z])[a-z0-9]* and with
Match Whole Word enabled finds just words consisting of alphanumeric characters in ASCII ranges 0-9A-Za-z and containing at least one numeric and one alphabetic character. As macro code:
Code: Select all
PerlReOn
Find RegExp MatchWord "(?:[a-z]+[0-9]|[0-9]+[a-z])[a-z0-9]*"
Also working would be:
Code: Select all
PerlReOn
Find RegExp "\b(?:[a-z]+[0-9]|[0-9]+[a-z])[a-z0-9]*\b"
Find RegExp "\<(?:[a-z]+[0-9]|[0-9]+[a-z])[a-z0-9]*\>"
\b ... any word boundary, does not match a character.
\< ... beginning of word, does not match a character.
\> ... end of word, does not match a character.
(?:...
) ... non-capturing group for the OR expression.
| ... OR
[a-z]+ ... one or more alphabetic characters.
[0-9]+ ... one or more numeric characters.
[a-z] ... one alphabetic character.
[0-9] ... one numeric character.
[a-z0-9]* ... 0 or more alphanumeric characters.
To include also non ASCII alphabetical characters from entire Unicode table use as search string
(?:[[:alpha:]]+[[:digit:]]|[[:digit:]]+[[:alpha:]])[[:alnum:]]* which excludes the underscore which is a word character matched by
\w.
\w and
[[:alnum:]] are therefore not equal.
\w is equivalent to
[[:word:]]. But
\d is equivalent to
[[:digit:]].
Are you confused now? Yes, read
Boost Perl Regular Expression Syntax from top to bottom. The Boost C++ RegExp library is included in UltraEdit. Which version of the library depends on version of UltraEdit. And UltraEdit does not support everything offered by the Boost C++ RegExp library. For example back-references with
\g... are not yet supported by UltraEdit v22.20.0.49.