Finding entries based on a set list that has wildcards in them. Need some ideas.

thereds

Diamond Member
Apr 4, 2000
7,886
0
0
Assume this scenario:

ls_entry = "http://*/*campaign*"

ls_currentwebpage = "http://adnea.com/thiswaytohell.campaign.com"

I'm having a hard time coming up with a good solution to compare ls_currentwebpage with ls_entry. ls_currentwebpage is technically equal to ls_entry because of the wildcards.

But if say ls_currentwebpage was "http://thiswaytohell.campaign.com", it won't be equal because the first wildcard ie the one right after 'http://' doesn't have anything to match up with ls_currentwebpage.

I'm having problems figuring out how to go about solving this. Ideas?
 

oog

Golden Member
Feb 14, 2002
1,721
0
0
I don't get what you're trying to accomplish. Would you like a wildcard string that will match any URL that contains "campaign" in it? What you have in ls_entry is almost right, but you need to make the / optional. Depending on which regex processor you're using, a question mark is often used to indicate that you would like to match whatever preceded it zero or one times.

On the other hand, if you really don't care either way what may precede the word "campaign", then what is wrong with "http://*campaign*"?

I'm a bit confused on what you're asking.