Topic awaiting preservation: Format URL in text string function.. (Page 1 of 1) |
|
---|---|
Bipolar (III) Inmate From: UK |
posted 08-23-2002 17:12
Hi all, |
Nervous Wreck (II) Inmate From: uk |
posted 08-23-2002 20:16
Hi Paul |
Bipolar (III) Inmate From: UK |
posted 08-23-2002 20:49
Thanks for the reply...I'll check it out and let you know how I get on.. |
Paranoid (IV) Inmate From: 127.0.0.1 |
posted 08-23-2002 21:08
Very cool! I was just thinking about this the other day. My only question is what needs to change in the regex to take full URLs? |
Nervous Wreck (II) Inmate From: uk |
posted 08-23-2002 21:28
you could mod the regexp to something like |
Paranoid (IV) Inmate From: 127.0.0.1 |
posted 08-23-2002 21:40
Okay, but that does just the opposite of the first. It resolves my question, but breaks the first method...... It doesn't create the <a> for shorter, conventional URLs. http://www.xxx.com doesn't work, while http://www.xxx.com/blah.php?a=1&b=2&c=3 does work. Ideally, shouldn't it create both links? |
Maniac (V) Mad Scientist From: 127 Halcyon Road, Marenia, Atlantis |
posted 08-23-2002 21:42
I know you can REPLACE EVERYTHING FROM 'http:' or 'https:' or 'ftp:' or 'www.' TO (the next space char) |
Paranoid (IV) Inmate From: 127.0.0.1 |
posted 08-23-2002 21:53
Okay - I just got to thinking about this as well: |
Nervous Wreck (II) Inmate From: uk |
posted 08-23-2002 22:20
i took so long to get my brain round that last bit that Pugzly has already soved it. |
Maniac (V) Mad Scientist From: 127 Halcyon Road, Marenia, Atlantis |
posted 08-23-2002 22:37
here's the string explained for the rest of us... |
Paranoid (IV) Inmate From: 127.0.0.1 |
posted 08-24-2002 00:13
Well, not to be outdone, I thought - what about pages ending in php3 or shtm or variants of the existing allowed extensions? |
Nervous Wreck (II) Inmate From: uk |
posted 08-24-2002 00:36
I think you would need to separate for example the php and 3 into its own group withing the extensions. |
Maniac (V) Mad Scientist From: 127 Halcyon Road, Marenia, Atlantis |
posted 08-24-2002 17:12
see I know that '.php3?' matches either '.php' or '.php3'.. but I'm still working on my 'everything up to the next space' regexp... but I can't get it to wok for some reason... |
Maniac (V) Mad Scientist From: 127 Halcyon Road, Marenia, Atlantis |
posted 08-24-2002 17:26
hah! got it... (it was deceptively simple) |
Maniac (V) Mad Scientist From: 127 Halcyon Road, Marenia, Atlantis |
posted 08-24-2002 17:40
since Pugzly asked.... here's the explanation for that one.... |
Maniac (V) Mad Scientist From: 100101010011 <-- right about here |
posted 08-24-2002 20:12
nice thread ya'll |
Paranoid (IV) Inmate From: A graveyard of dreams |
posted 08-24-2002 20:50
Love this thread! Never really gotten the hang of those regexp's, but at least I understood the ones here thanks to those wonderfull explantions |
Maniac (V) Mad Scientist From: 127 Halcyon Road, Marenia, Atlantis |
posted 08-24-2002 21:48
there... used a little UBB to make the explanations a little more 'Aslyum Friendly' |
Paranoid (IV) Inmate From: 127.0.0.1 |
posted 08-25-2002 01:57
Hmmm, ok.... I won't be outdone, Petskull! |
Maniac (V) Mad Scientist From: 127 Halcyon Road, Marenia, Atlantis |
posted 08-25-2002 10:35
<script language="javascript"> |
Nervous Wreck (II) Inmate From: uk |
posted 08-25-2002 18:06
Hey nice work.. I was the same with those regex's, i hated them before this thread, but kinda understand them now. |
Maniac (V) Mad Scientist From: 127 Halcyon Road, Marenia, Atlantis |
posted 08-25-2002 19:01
here, I'm going to write a little reference |
Maniac (V) Lord Mad Scientist Sovereign of all the lands Ozone and just beyond that little green line over there... From: Stockholm, Sweden |
posted 08-25-2002 20:42
Petskull, after this post, you are my new hero. Why have I never "gotten" RegEx? Since 1994, my hard core programming buds lay this on me, "Oh simple!" they say, you just "[insert a bunch of incomprehensible characters here]"! Expect some of this stuff to creep into the project I'm working on right this minute. |
Lunatic (VI) Mad Scientist From: Massachusetts, USA |
posted 08-25-2002 21:00
Looking at your regexp there, |
Maniac (V) Mad Scientist From: 127 Halcyon Road, Marenia, Atlantis |
posted 08-25-2002 21:14
remember: |
Bipolar (III) Inmate From: UK |
posted 08-27-2002 09:33
Guys, |
Paranoid (IV) Inmate From: Northumberland, England |
posted 04-24-2003 18:29
petskull wrote: /^\b(http: |
Maniac (V) Mad Scientist From: 127 Halcyon Road, Marenia, Atlantis |
posted 04-25-2003 08:44
I think this should work, but you'll need to test for the 'www.' case so you can add the "http://" |
Paranoid (IV) Inmate From: Northumberland, England |
posted 04-25-2003 18:11
petSkull wrote: "way to resurrect a thread, by the way.." |
Maniac (V) Mad Scientist From: 127 Halcyon Road, Marenia, Atlantis |
posted 04-27-2003 05:43
by all means, that a great thing! |
Paranoid (IV) Inmate From: Northumberland, England |
posted 04-27-2003 13:06
well petskull my friend, I would appreciate your help on my other posts. As you may be aware I have been trying to create a horizontal thumbnail image scroller whose(it's not a person but it sounds better) direction and speed is controlled by the position of the mouse within the containing div. Something that has been used a lot in flash sites now but still remains a seemingly untouched area in dhtml. I know it can be done, and I have seen examples that use similar principles (the doc's landscape looping scroller thingy) but as Dracusis said in one of his replies it would better if I created it myslef that way I would understand what is happening and wouldn't have to deal with unecessary code. Trouble is my skills are none and my time little, so any segmented help anyone can give me would enable me to learn aswell as staying within my time constraints. |
Maniac (V) Mad Scientist From: 127 Halcyon Road, Marenia, Atlantis |
posted 04-27-2003 18:21
well, here's what I suggest- |