Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- extends TextEdit
- func _on_TextEdit_text_changed():
- var _regex = RegEx.new()
- var temp_text : String = text
- var formated_text : String
- var old_column = cursor_get_column()
- var old_line = cursor_get_line()
- text = ""
- _regex.compile("\\w|\\p{Latin}| ")
- for result in _regex.search_all(temp_text):
- formated_text += result.get_string()
- text = formated_text
- print(text)
- cursor_set_column(old_column)
- cursor_set_line(old_line)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement