java吧 关注:1,235,646贴子:12,703,135
  • 24回复贴,共1

如何用正则表达式将字符串中的某个子串提取出来

只看楼主收藏回复

各位大哥,请教一下
字符串如下:
FN;ENCODING=QUOTED-PRINTABLE;CHARSET=UTF-8:=E5=A5=95=E5=BD=AC =E9=83=91

N;ENCODING=QUOTED-PRINTABLE;CHARSET=UTF-8:=E9=83=91;=E5=A5=95=E5=BD=AC;;;
ORG;ENCODING=QUOTED-PRINTABLE;CHARSET=UTF-8:=E5=8D=8E=E5=8D=97=E5=86=9C=E4=
=B8=9A=E5=A4=A7=E5=AD=A6;=E5=BC=80=E5=8F=91=E9=83=A8
TEL;HOME:075486652495
TEL;WORK:02082224556
TEL;CELL:15800038835
TEL;FAX;WORK:010245566
ADR;WORK;ENCODING=QUOTED-PRINTABLE;CHARSET=UTF-8:;;=E5=B9=BF=E5=B7=9E=E5=
=B8=82=E5=A4=A9=E6=B2=B3=E5=8C=BA=E4=BA=94=E5=B1=B1=E8=B7=AF;=E5=B9=BF=E5=
=B7=9E=E5=B8=82;=E5=B9=BF=E4=B8=9C=E7=9C=81;515000;=E4=B8=AD=E5=9B=BD
ADR;HOME;ENCODING=QUOTED-PRINTABLE;CHARSET=UTF-8:;;=E6=BD=AE=E9=98=B3=E5=
=8C=BA=E9=87=91=E6=B5=A6=E8=A1=97=E9=81=93=E6=A2=85=E8=8A=B1=E4=B9=A1;=E6=
=B1=95=E5=A4=B4=E5=B8=82;=E5=B9=BF=E4=B8=9C=E7=9C=81;515100;=E4=B8=AD=E5=
=9B=BD
就是将上面的
ADR;WORK;ENCODING=QUOTED-PRINTABLE;CHARSET=UTF-8:;;=E5=B9=BF=E5=B7=9E=E5=
=B8=82=E5=A4=A9=E6=B2=B3=E5=8C=BA=E4=BA=94=E5=B1=B1=E8=B7=AF;=E5=B9=BF=E5=
=B7=9E=E5=B8=82;=E5=B9=BF=E4=B8=9C=E7=9C=81;515000;=E4=B8=AD=E5=9B=BD
这个字符串用正则表达式匹配并提取出来,谢谢~~


IP属地:广东1楼2012-10-29 19:19回复


    IP属地:广东3楼2012-10-29 19:25
    回复


      IP属地:广东4楼2012-10-29 19:25
      回复


        IP属地:广东5楼2012-10-29 19:25
        回复


          IP属地:广东6楼2012-10-29 19:25
          回复


            IP属地:广东7楼2012-10-29 19:26
            回复


              IP属地:广东8楼2012-10-29 19:26
              回复


                IP属地:广东9楼2012-10-29 19:26
                回复


                  IP属地:广东10楼2012-10-29 19:26
                  回复


                    IP属地:广东11楼2012-10-29 19:27
                    回复


                      IP属地:广东12楼2012-10-29 19:27
                      回复


                        IP属地:广东14楼2012-10-29 19:29
                        回复
                          调试结果:



                          IP属地:上海16楼2012-10-29 19:38
                          收起回复
                            FN;ENCODING=QUOTED-PRINTABLE;CHARSET=utf-8:=E9=98=BF=E9=97=A8
                            我也在用vb弄,匹配不出来呀


                            IP属地:河南18楼2014-02-01 23:08
                            回复