`
sunburst
  • 浏览: 14461 次
  • 性别: Icon_minigender_1
  • 来自: 广州
社区版块
存档分类
最新评论

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
分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics