Results 1 to 10 of 10

Thread: Wildcards *

  1. #1

    Thread Starter
    Hyperactive Member New to VB 6's Avatar
    Join Date
    Apr 2002
    Posts
    362

    Question Wildcards *

    Is there any way to find out what is in a string by using wildcards?

    Example:
    find out what is in bgcolor by using wildcards.

    bgcolor="*" would produce bgcolor="#FF00F1" or any of the other possable combo's of colors. like bgcolor=("black", "white", "red", etc.) or bgcolor=("#000000", "#FFFFFF", "#FF0000", etc.)
    [VBCODE]
    Option Explicit
    Dim XXX As Porn
    Dim Wife As Nag

    Private Sub *****_Resize()
    On Error Resume Next
    Get Viagra
    End Sub
    [/VBCODE]

  2. #2
    Super Moderator si_the_geek's Avatar
    Join Date
    Jul 2002
    Location
    Bristol, UK
    Posts
    41,974
    You can use the LIKE operator in vb code, check out help for details

  3. #3
    Stuck in the 80s The Hobo's Avatar
    Join Date
    Jul 2001
    Location
    Michigan
    Posts
    7,256
    Originally posted by si_the_geek
    You can use the LIKE operator in vb code, check out help for details
    I think he might be doing this in PHP, not VB...
    My evil laugh has a squeak in it.

    kristopherwilson.com

  4. #4

    Thread Starter
    Hyperactive Member New to VB 6's Avatar
    Join Date
    Apr 2002
    Posts
    362
    yes I am trying to do this in php
    [VBCODE]
    Option Explicit
    Dim XXX As Porn
    Dim Wife As Nag

    Private Sub *****_Resize()
    On Error Resume Next
    Get Viagra
    End Sub
    [/VBCODE]

  5. #5
    Super Moderator si_the_geek's Avatar
    Join Date
    Jul 2002
    Location
    Bristol, UK
    Posts
    41,974
    oops.. I really should check the forum that questions are in...

  6. #6
    Stuck in the 80s The Hobo's Avatar
    Join Date
    Jul 2001
    Location
    Michigan
    Posts
    7,256
    Originally posted by New to VB 6
    yes I am trying to do this in php
    Your question confuses me.

    Do you have text such as:

    Code:
    bgcolor=("#000000", "#FFFFFF", "#FF0000", etc.)
    
    -or-
    
    bgcolor="#000000"
    and want to put the colors in an array?
    My evil laugh has a squeak in it.

    kristopherwilson.com

  7. #7

    Thread Starter
    Hyperactive Member New to VB 6's Avatar
    Join Date
    Apr 2002
    Posts
    362
    bgcolor=("#000000", "#FFFFFF", "#FF0000", etc.) is just an example of the various color codes

    I just want to find out what is between the " " (quotes) i.e. #FFFFFF or any of the other million of color codes since I do not know what the color code will be whether it is as simple as RED or complex as skyblue or just the standard 7 char. color code like #FFFFFF or #FF0000. I'm just hoping for some all-purpous string of code that will find the color whether it's 1 char. long or 100 chars. long.

    Hense the bgcolor="*"

    I can do it if I put 256 million if and else statments in but that would make the PHP page about 10 Mb in size and would take forever to load.
    [VBCODE]
    Option Explicit
    Dim XXX As Porn
    Dim Wife As Nag

    Private Sub *****_Resize()
    On Error Resume Next
    Get Viagra
    End Sub
    [/VBCODE]

  8. #8
    Lively Member
    Join Date
    May 2001
    Location
    Fredericton, NB, Canada
    Posts
    85
    You could use regular expressions?

  9. #9
    Stuck in the 80s The Hobo's Avatar
    Join Date
    Jul 2001
    Location
    Michigan
    Posts
    7,256
    Originally posted by PunkRockNeil
    You could use regular expressions?
    If you've ever used regular expressions before, you know just saying "you could use regular expressions" isn't going to help him at all if he has never used them himself.
    My evil laugh has a squeak in it.

    kristopherwilson.com

  10. #10
    Frenzied Member
    Join Date
    Nov 1999
    Posts
    1,337
    10Mb?? that is nothing. Progtom had a 1 TB file in php. LOL

    but anyway. what do you mean by wild card? how is the string layed out?

    bgcolor="*" would produce bgcolor="#FF00F1" or any of the other possable combo's of colors. like bgcolor=("black", "white", "red", etc.) or bgcolor=("#000000", "#FFFFFF", "#FF0000", etc.)
    that is totally confusing

    the * will produce nothing

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