String extraction

  • string extraction:

    Hi,

    1)IF input = SampleDoc (07)

    o/p should be sampledoc(07)

    2) For '/Customer Service/CS Team - 2/New Document2'

    needed CS Team - 2

    3)/Enrollment Analyst/Enrollment Analyst 1

    needed: Enrollment Analyst 1

    4) For '/Indexing/Indexing 2/General - 4\24\2012'

    Needed: Indexing 2

    Here from above I mean any thing between second '/' and third'/'

    and if there is no '/' just get the string from input.

    Any help will be appreciated

  • komal145 (5/3/2012)


    string extraction:

    Hi,

    1)IF input = SampleDoc (07)

    o/p should be sampledoc(07)

    2) For '/Customer Service/CS Team - 2/New Document2'

    needed CS Team - 2

    3)/Enrollment Analyst/Enrollment Analyst 1

    needed: Enrollment Analyst 1

    4) For '/Indexing/Indexing 2/General - 4\24\2012'

    Needed: Indexing 2

    Here from above I mean any thing between second '/' and third'/'

    and if there is no '/' just get the string from input.

    Any help will be appreciated

    There is no third'/' in 3), do you still "needed: Enrollment Analyst 1"

    _____________________________________________
    "The only true wisdom is in knowing you know nothing"
    "O skol'ko nam otkrytiy chudnyh prevnosit microsofta duh!":-D
    (So many miracle inventions provided by MS to us...)

    How to post your question to get the best and quick help[/url]

  • yes

  • This looks like an extension of this one, just by a different poster. I wonder if this may be homework for a class?

  • Hi..it was by me only!!!

    I tried but its not working for the string types mentioned above.

  • komal145 (5/3/2012)


    Hi..it was by me only!!!

    I tried but its not working for the string types mentioned above.

    For future reference, you really should have continued using that thread and expanded on the problem there. It would keep things together and provide a progression with regard to the problem.

    I sat here thinking "Didn't we just do something similar?" Now we know there are additional criteria and we can work from there.

  • Now, a question. Do we need to satisfy both the requirements here and the other thread? You had one string in the other thread that you wanted the what was after the third '\'.

    Look over both threads and see if you can provide a good description of the rules we need to follow.

  • Ya I agre with you.I realised later.

  • I would say..it should satisfy the other thread too and also when I was looking at the different strings , they are not satisfying the rules

    1) needed the name between second '/'and third "/'

    2) If there is no '/' need only string value as o/p

  • komal145 (5/3/2012)


    I would say..it should satisfy the other thread too and also when I was looking at the different strings , they are not satisfying the rules

    1) needed the name between second '/'and third "/'

    2) If there is no '/' need only string value as o/p

    What if there is only one '/'?

  • ex:/csteam

    the o/p=csteam

Viewing 11 posts - 1 through 10 (of 10 total)

You must be logged in to reply to this topic. Login to reply