Venkatesh S
Venkatesh S

Reputation: 5492

get the last string after the special character in EditText TextWatcher

In edittext while entering the text

Eg: @android @developer @stackoverflow

I need the get the last enter character after "@" symbol

Expected Output from edittext textwatcher in android

while typing single word with @android

I need to extract the android from textwatcher

while typing two word with @android @developer

I need to extract the developer from textwatcher

while typing three word with @android @developer @stackoverflow

I need to extract the stackoverflow from textwatcher

Thanks in advance ....

Upvotes: 0

Views: 980

Answers (1)

Jigar Joshi
Jigar Joshi

Reputation: 240918

See usage of lastIndexOf() and substring() methods

Upvotes: 1

Related Questions