Members

Technology Zones

Articles

Hosted By

MaximumASP

Info

Regular Expression

Last post 03-27-2008 6:10 AM by MohitMehta. 1 replies.
Page 1 of 1 (2 items)
Sort Posts: Previous Next
  • 03-27-2008 5:32 AM

    Regular Expression

    Hi,

    Please read example to get my requirement.

     String: "cancer of lung is example string to dig out the cancer."

    I want to get cancer only in case when "cancer" is following "of lung".

    is there any single regular expression which can do this.

     

    Regards,

    Ashwani
     

    life is like cotton:- don't make it havier by sinking it in water of sorrow but make it lighter by letting it blow in wind of joy.
    • Post Points: 5
  • 03-27-2008 6:10 AM In reply to

    Re: Regular Expression

    I got it.

    i can use this

    [a-zA-Z]+(?=( )of( )lung) 

     but take the below example

    "lung cancer of lung is called as something of lung "

    now my requirement is i want "cancer lung" and "something lung" through one regular expression.

     

    any help. 

    life is like cotton:- don't make it havier by sinking it in water of sorrow but make it lighter by letting it blow in wind of joy.
    • Post Points: 5
Page 1 of 1 (2 items)