xapss Posted May 6, 2009 Share Posted May 6, 2009 Hi, First of all, thx for reading! For a new subtitle project, I want to know whether the search string contains a series or not. And, if this is a release or not. Possible options for a $searchstring: $searchstring = "The.Big.Bang.Theory.S02E01.REAL.PROPER.HDTV.XviD-NoTV"; $searchstring = "The_Big_Bang_Theory.2x09.The_White_Asparagus_Triangulation.HDTV_XviD-FoV"; $searchstring = "the big bang theory s02e01"; $searchstring = "the big bang theory"; Now, how can I figure out if this is a request for a series or not? Second, the first two are releases while the last two are not. How can I distinct between them? By using the '.'? Thanks a lot, I've been searching&trying for hours with substr, preg & more. Hope you guys can help, thx! Quote Link to comment Share on other sites More sharing options...
neogemima Posted May 9, 2009 Share Posted May 9, 2009 Can you elaborate on that a little bit, when you say series and release, are you talking about the item they are searching for? If I am interpreting your question correctly, that would depend on information in the database you are searching. Quote Link to comment Share on other sites More sharing options...
.josh Posted May 9, 2009 Share Posted May 9, 2009 how should we know whether the string is a series or not? That's just random data to someone on the outside. You need to explain what in the string makes it a series or not. Same thing with your question about whether its a release or not. Sure, I could tell that the last 2 don't have dots in it, so check if there's dots in there, but that may or may not help you. How would I know whether releases in general would have dots in them or not? It's all just random arbitrary data to us outsiders. In other words, you need to explicitly define what constitutes a series and release. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.