android edittext获取选中文字

http://blog.23corner.com/2010/04/20/building-android-on-mac-os-x-10-6/

http://www.citymoments.cn/home/download


http://lichen1985.com/blog/?p=144


http://code.google.com/p/simple-iphone-image-processing/

http://www.cocoadev.cn/iPhone-iPad/iPhone-Uimage-Write-to-file.asp

http://dev.chinamobile.com/cmdn/wiki/index.php?doc-view-2274.html?from=home

http://www.iphone-geek.cn/%E7%BC%96%E7%A8%8B/%E4%BD%BF%E7%94%A8uiimagepickercontroller%E4%BB%8Eiphone%E7%85%A7%E7%89%87%E5%BA%93%E6%88%96%E7%85%A7%E7%9B%B8%E6%9C%BA%E8%8E%B7%E5%8F%96%E5%9B%BE%E5%83%8F

http://code.google.com/p/css-vfx/

http://www.jasonworkshop.com/index.php?b=20090614120000


http://www.iphonedevsdk.com/forum/iphone-sdk-development/15846-simple-paint-app.html


EditText view =
(EditText)findViewById(R.id.edt);

Editable edit = view.getText();

int sta =
view.getSelectionStart();

int end = view.getSelectionEnd();

String sel = edit .toString().substring(beg, end);


This String sel is the word selected by user


String m="(^(\\d{2,4}[-_-—]?)?\\d{3,8}([-_-—]?\\d{3,8})?([-_-—]?\\d{1,7})?$)|(^0?1[35] \\d{9}$)";

String m2="^((\\+86\\-)|(86\\-))?(([0-9]{3,4}\\-)?([0-9]{7,8}))+(\\-[0-9]{0,4})?$";

String m4="^((\\+86\\-)|(86\\-))?([0-9]{0,11})?$";

String m3="(\\d{3})\\D*(\\d{3})\\D*(\\d{4})\\D*(\\d*)$";

String am="[\\d{1,3}]?[ -]?[\\d{0,3}]?[ -]?[\\(.]?[2-9]\\d\\d[\\).]?[ -]?[2-9]\\d\\d[-.]\\d{4}";

//String[] str={"(800) 555-1212","1(234)567-8901","917-8681888","(012)345-6789","+8613750034336","13750034336","+86-0532-8855555-0001","86-0352-8855555-0001","0352-8855555-0001","8855555-0001", "8855555" };

String[] str={"00-1-917-6861888","1(234)567-8901","248-555-1234","314-555-4000","800-555-4400","(314)555-4000","314.555.4000","555-4000","aasdklfjklas","1234-123-12345"};

Pattern pattern = Pattern.compile(am,Pattern.CASE_INSENSITIVE);

boolean flag=false;

for(int i=0;i
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值