Please help me on regukar expression

Discussion in 'PHP' started by prathyush, Nov 8, 2007.

  1. #1
    HI friend..

    please help me somebody... I have a string like
    00001740 29 v 04 breathe 0 take_a_breath 0 respire 0 suspire 3 021 * 00005041 v 0000 * 00004227 v 0000 + 03110322 a 0301 + 00831191 n 0303 + 04080833 n 0301 + 04250850 n 0105 + 00831191 n 0101 ^ 00004227 v 0103 ^ 00005041 v 0103 $ 00002325 v 0000 $ 00002573 v 0000 ~ 00002573 v 0000 ~ 00002724 v 0000 ~ 00002942 v 0000 ~ 00003826 v 0000 ~ 00004032 v 0000 ~ 00004227 v 0000 ~ 00005041 v 0000 ~ 00006697 v 0000 ~ 00007328 v 0000 ~ 00017031 v 0000 02 + 02 00 + 08 00 | draw air into, and expel out of, the lungs; "I can breathe better when the air is clean"; "The patient is respiring"


    .. the red colored item may have 1 or more words seperated by zero... what I want is to generate a regular expression to remove zeros in between two english words only... there may be other zeros , that is not a problem.


    please help!!!
     
    prathyush, Nov 8, 2007 IP
  2. nico_swd

    nico_swd Prominent Member

    Messages:
    4,153
    Likes Received:
    344
    Best Answers:
    18
    Trophy Points:
    375
    #2
    Do you want the rest of the string to remain the same? And just remove these zeros at the beginning of the string?

    Or do you actually just want these few words, without the rest of the string?
     
    nico_swd, Nov 9, 2007 IP