I want to replace using this regex pattern “[^a-zA-Z]” to remove anything that isn’t a letter.
dim rx as new RegEx
dim match as RegExMatch = rx.Search(TextField1.Text )
if match is nil then
msgbox "nothing found"
msgbox "found it"
but it wont work.
its mention in LR. that I have to use. regex.replace, but that option is not showing.
any help. ?
Something like this…
[code]dim s as string=“abc123ABC!@#”
dim rx As new RegEx
A couple of things about your pattern:
- Xojo’s RegEx is case-INsensitive, so you only need
- 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”.