+ Reply to Thread
Results 1 to 4 of 4

Extract text from String using any software

  1. #1
    Registered User
    Join Date
    05-07-2009
    Location
    Singapore But in China now
    MS-Off Ver
    Excel 2007
    Posts
    25

    Extract text from String using any software

    Hi All & Good Day,

    I'm student doing my attachment. I've encounter this problem and I really need some help here.
    Please kindly help or share any knowlegde if u can. I will be very greatful for any help given. THanks a million in adv.

    Problem:

    I've this junk of code and what i need to extract is the ItemID after swItem= but there main problem here is i only need the first part which highlight in blue.

    Therefore i'm wondering if it's possible to write a VBA which will find the HTML tag

    <aclass="udrlinesmall then extract the inform within the which wildcard happen to be <XXXXXXXXXX> and inside the wildcard find the second wildcard which is swItem= then extract the ItemID = "MTX-c380636094ed4c24a5a22b6542" and paste in in a new doc or at the bottom of the doc.

    *NOTE : There is more then "swItem=" therefore it need to be inside the <aclass="udrlinesmall xxxxx....> tag

    Really thanks everyone in adv. This will be great different in my grade for attachment pls kindly help if can. THANK YOU!

    Please Login or Register  to view this content.
    Noobie here to LEARN

  2. #2
    Registered User
    Join Date
    05-07-2009
    Location
    Singapore But in China now
    MS-Off Ver
    Excel 2007
    Posts
    25

    Re: Extract text from String using any software

    anyone? any suggestion?

  3. #3
    Forum Guru DonkeyOte's Avatar
    Join Date
    10-22-2008
    Location
    Northumberland, UK
    MS-Off Ver
    O365
    Posts
    21,531

    Re: Extract text from String using any software

    Could you post a sample file - it's quite hard to follow where the data is located what your desired output is etc...

    In VBA terms you could possibly look at Regular Expressions and or the simpler Split method, ie:

    Please Login or Register  to view this content.
    You can iterate through vString until such time as the value is the swItem variable, eg:

    Please Login or Register  to view this content.
    EDIT: Doh - I didn't see this was in Word ... apologies...
    Last edited by DonkeyOte; 05-22-2009 at 03:32 AM.

  4. #4
    Registered User
    Join Date
    05-07-2009
    Location
    Singapore But in China now
    MS-Off Ver
    Excel 2007
    Posts
    25

    Re: Extract text from String using any software

    Is ok with excel also.. actually it's a HTML file.. i'm using it source to extract the link.

    Here the sample

    http://www.easy-share.com/1905311225/PLease_Help.rar
    Last edited by whousedmy; 05-22-2009 at 04:49 AM.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1