Readfile to Support RegEx.
Posted: 20 Oct 2010 08:46
If readfile() could support regEx, I could scan a document after URLs instead of blindly cleaning off everything else. This could store matching results by separators like [crlf], [|] or [;] and combinations like [;<crlf>].
-or is this already possible and I'm speaking dumbness? If so, how?
I'm trying to achieve a similar effect to what this (fixed) script already does, but it seems to be limited to one paragraph only, with limited support to separators, too.
Thanks!
-or is this already possible and I'm speaking dumbness? If so, how?
I'm trying to achieve a similar effect to what this (fixed) script already does, but it seems to be limited to one paragraph only, with limited support to separators, too.
Code: Select all
"Open URL in clipboard"
regexreplace $url, "<clipboard>", ".*(https?://([-\w\.]+)+(:\d+)?(/([\w/_\.]*(\?\S+)?)?)?).*", "$1";
text $url;
//disabled for test purposes: open $url;