Results 1 to 4 of 4

Thread: [RESOLVED] [2005] Simple RegEx help

  1. #1

    Thread Starter
    Registered User nmadd's Avatar
    Join Date
    Jun 2007
    Location
    U.S.A.
    Posts
    1,676

    Resolved [RESOLVED] [2005] Simple RegEx help

    I seem to stink at regular expressions. All I want out of this is the number between LIC and the dash; in this example 1276. Would appreciate any help for this RegEx hack.

    Code:
    LIC1276-0706.xls
    EDIT: My brain does not seem to be functioning this morning. Who knows why I was doing it the hard way. Disregard.
    Last edited by nmadd; Aug 30th, 2007 at 09:02 AM.

  2. #2
    I'm about to be a PowerPoster! Hack's Avatar
    Join Date
    Aug 2001
    Location
    Searching for mendhak
    Posts
    58,333

    Re: [RESOLVED] [2005] Simple RegEx help

    What did you do to solve the problem?

  3. #3

    Thread Starter
    Registered User nmadd's Avatar
    Join Date
    Jun 2007
    Location
    U.S.A.
    Posts
    1,676

    Re: [RESOLVED] [2005] Simple RegEx help

    I just split at the "-" and took a substring starting at the 3rd character of the first string from the split.

    For some reason when I first though about it, I thought I would need to do something with RegEx. It was much easier to just do something that I already knew.

  4. #4
    PowerPoster stanav's Avatar
    Join Date
    Jul 2006
    Location
    Providence, RI - USA
    Posts
    9,290

    Re: [RESOLVED] [2005] Simple RegEx help

    Just in case you change your mind and want to do it with regex
    Code:
    Dim pattern As String = "(?<=LIC)[0-9]*(?=-)"

Posting Permissions

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



Click Here to Expand Forum to Full Width