![]() |
preg_match help wanted
Hi all:
I have strings like PHP Code:
Thanks |
Well I'm not a regex expert or anything but I thought I'd give it a shot:
PHP Code:
output is: Code:
Array |
You are a confirmed genius, my friend. It works like a charm.
Thank you very much. --------------- Added [DATE]1260000667[/DATE] at [TIME]1260000667[/TIME] --------------- :D I am greedy and back for one more and hopefuly last Q for this project. My strings can be PHP Code:
PHP Code:
|
Hmm...maybe:
Code:
if (strncasecmp("http:", $var, 5) == 0) { One thing I thought of that posting last night, it doesn't handle white space very well, it's possible to write a pattern that would ignore any white space on either end of the file name. (Or I guess you could also use trim() on the result if it were an issue). |
All times are GMT. The time now is 07:51 AM. |
Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|