I want to replace using this regex pattern “[^a-zA-Z]” to remove anything that isn’t a letter.
dim rx as new RegEx
rx.SearchPattern ="[^a-zA-Z]"
dim match as RegExMatch = rx.Search(TextField1.Text )
if match is nil then
msgbox "nothing found"
else
msgbox "found it"
rx.ReplacementPattern="[^a-zA-Z]"
end if
but it wont work.
its mention in LR. that I have to use. regex.replace, but that option is not showing.
Xojo’s RegEx is case-INsensitive, so you only need [^a-z].
If the text you’re matching against might contains letters from other languages than English, e.g., “ü”, you are better off using the Unicode variant. Try \\PL instead, which means “anything that is not a letter as defined by Unicode”.