July 14, 200818 yr I've got a very long variable that reads something like this: Some text...some more text... <!-- START --> This text is important <!-- FINISH --> Some more text I want just the text between START and FINISH. Whats the best way to get JUST that text? Exploding the string at START and taking $start[1], then exploding it again at FINISH and taking $finish[0] seems a bit silly...there must be a better way?
July 14, 200818 yr assuming you're talking php... have you read into regular expressions? http://uk.php.net/manual/en/ref.pcre.php
July 14, 200818 yr Author regex makes me cry a little inside One of those things I've never been able to get my head around. And yeah, PHP.
July 15, 200818 yr regex makes me cry a little inside One of those things I've never been able to get my head around. And yeah, PHP. You should really try and wrap your head around regular expressions, it will make your life easier in the future, especially with validation of form input.
Create an account or sign in to comment