Preserved Topic: Simple RegExp (Page 1 of 1) |
|
---|---|
Bipolar (III) Inmate From: Stockholm, Sweden |
posted 09-11-2001 13:40
This question goes to anyone on the Asulym, but i KNOW the guru mr.MaX will solve it for me :-] |
Maniac (V) Mad Scientist From: Belgrade, Serbia |
posted 09-11-2001 14:20
<SCRIPT TYPE="text/javascript" LANGUAGE="JavaScript"> |
Maniac (V) Inmate From: Brisbane, Australia |
posted 09-11-2001 14:26
Dammit MAX! I could have actualy answered that one! heh |
Paranoid (IV) Inmate From: Lebanon |
posted 09-11-2001 14:59
My turn now code: url = "http://www.someserver.com/somefolder/file.html".match(/(.+?)[^/]+$/i);
|
Paranoid (IV) Inmate From: Lebanon |
posted 09-11-2001 15:08
Now mr.Max your turn again! |
Maniac (V) Mad Scientist From: Belgrade, Serbia |
posted 09-11-2001 23:56
Lallous, actually your code isn't simpler than mine. Only thing that you did is condense functions, but your RegEx is still more complex than mine. Anyway, I won't go into cross browser issues since I don't have time. |
Paranoid (IV) Inmate From: Lebanon |
posted 09-12-2001 09:00
I now beleive that NetScape doesnt fully support PCRE (Perl Compatible Regular Expression) as opposite to JavaScript, PHP, Delphi's TRegExpr unit, and many other RegExps librarys that i'm testing on! code: str = "http://www.someserver.com/somefolder/file.html";
|
Maniac (V) Mad Scientist From: Belgrade, Serbia |
posted 09-12-2001 17:58 |
Paranoid (IV) Inmate From: Lebanon |
posted 09-12-2001 20:54
of course mr.Max but what I really mean that using the Replace method is not the optimal way to extract information...it should have been a pure Regular expression that extracts the info... |
Maniac (V) Mad Scientist From: Belgrade, Serbia |
posted 09-12-2001 21:30 |