I\'m looking for a ColdFusion or Java regex (to use in a replace function) that will only match numbers [0-9], letters [a-z], but include none ASCII Portuguese
Try alphanumeric character class: \w
, it should match letters, digits, and underscores.
Also you can use special named class \p{L}
(I don't know, does Java RegEx parser support it).
So in C# your task can be done using following code:
var input = "informação 123 ?:#$%";
var result = Regex.Replace(input, @"[^\p{L}\s0-9]", string.Empty);
Regex [^\p{L}\s0-9]
means: any character not in this class (all letters, white space, digits). Thereby it matches in your example ?:#$%
and we can replace these characters with empty string.