Sure :

As per each item respectively:

I am looking to match any qualified URL, for the sake of conversation
and getting me on the right path; I need to pull "http://
www.myexampledomain.com" out of any string that opens with javascript
- I'll likely make a check prior to the Regex match that checks for
this. To be a bit more helpful... I really want from "\"http://"; to
the following "\"" or '. I am really not interested in anything that
doesn't contain an http://, as it is likely a relative link that I'm
going to have to build up to resolve anyway ( not in my current
scope ) or it is some other protocol that I am not prepared to deal
with in this implementation.

Sample input would likely appear as follows:
good:
javascript( '', 0, "http://www.domain.com"; );
good:
javascript( 'http://sub.domain.com' );
bad:
javascript( 'somevar', './index.aspx' );

and I would hope to extract:

'http://www.domain.com'
'http://sub.domain.com'
null

As I believe I mentioned ( or perhaps didnt, don't particularly care
to re-read my first ) I don't have any real experience with Regexes,
but likely wont have a difficult time implementing it if I have some
possible working examples for this match.

Again, I greatly appreciate everyone's help and hope to hear back
soon.
On Aug 25, 6:25 am, Cerebrus <[email protected]> wrote:
> Whenever posting questions about Regular expressions, try to make sure
> to provide the following data:
>
> 1. What you want to match, including possible combinations that can
> match. Also, what you don't want to match, if applicable.
>
> 2. A sample of input text so the geeky (or as you mentioned, 'lovely')
> members of the Group can test their Regexes.
>
> 3. Any regexes you have come up with and their shortcomings (if any).
>
> This information when provided will obviate the need for us to
> reinvent the Regex wheel.
>
> On Aug 25, 12:04 am, "A. Anderson" <[email protected]>
> wrote:
>
>
>
> > Hello,
>
> > New to the group, relatively new to C#, lot of programming experience;
> > not on this particular topic though. Thanks ahead of time to anyone
> > that can help.
>
> > Working with a web crawler ( irrelevant ) that searches web content
> > for links matching certain criteria. When I catch one inside of a
> > javascript function, I catch some kind of pretty exception about not
> > being able to resolve 
> > 'javascript('',0,'http://www.whatimlookingfor.com');'. Makes perfect sense 
> > that this would be
> > the case. What I am looking for is a regular expression to pull that
> > link out of the surrounding javascript so that I might parse it.
>
> > This is why I have come to you lovely ladies and gentlemen. I'm the
> > first to admit a shortcoming when it comes to knowledge of
> > implementation of regular expressions, so any help I can get would be
> > great. Thank you to anyone who can offer it.

Reply via email to