I'm not sure how to do this, but . . .
OK, so I have a string called $aturl with a URL in it, for example "http://www.mysite.com/asdfom/adsf.htm". Then I have another string, $myuser, that has a domain in it such as "mysite.com". Now, I need to do two things:
1) See if $myuser is withing $aturl, regardless of case. I'm not too worried about this, since I believe I know how to convert a string to lowercase using a regex. I just put this here wondering if it could be fit into #2 (and henceforth the code optimized).
2) If $myuser is in $aturl, put everything _after_ $myuser into a seperate string. The location of $myuser needs to be regardless of case, but the new string needs to have the case it originally did in $aturl.
I hope I'm not bothering the Monks, but I really don't know where to start. I tried searching, but I didn't know what to search for. (If only Perl had MFC, I could do this in a heartbeat . . . sigh.)
Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
Read Where should I post X? if you're not absolutely sure you're posting in the right place.
Please read these before you post! —
Posts may use any of the Perl Monks Approved HTML tags:
- a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
| |
For: |
|
Use: |
| & | | & |
| < | | < |
| > | | > |
| [ | | [ |
| ] | | ] |
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.