Jump to content

JAY6390

Members
  • Posts

    825
  • Joined

  • Last visited

Everything posted by JAY6390

  1. Not sure how you are getting the extra () unless something has been added, I get Ore-tachi ni Tsubasa wa Nai - 01
  2. $subject = '[sHiN-Remux][MSPN-SUBS] Ore-tachi ni Tsubasa wa Nai - 01 [1280x720 h.264 AAC][FB36073E].mkv'; $result = trim(preg_replace('/(\[[^\]]+\]|\.mkv)/i', '', $subject)); echo $result;
  3. it's easier to use parse_url
  4. Oops you need to escape the escape character twice, like so /'(.*?)(?<!\\\\)'/
  5. Are you just wanting to list all matches that do? Or are you wanting to replace them with just one of that character, something like this $result = preg_replace('/([a-z])\1{2,}/i', '$1', $subject); Note that this is case insensitive
  6. put a - before the \d That should do it
  7. That's javascript not PHP The likely change you will need to make is to change parseInt($('#minimum_hours_charge').val())<0 so that 0 is 1
  8. Your best option would be to explode() the string then use array_search to check for both values $arr = explode(' ', $string); if(in_array('567', $arr) && in_array('777', $arr)) { // TRUE } else { // FALSE }
  9. Also note the $$text should be $text (ie the two $$ was a typo) - I tried to edit but the time limit expired apparently, so hopefully you don't have the same as me if it's working
  10. $text = preg_replace('/\b([A-Z0-9._%+-]+@[A-Z0-9.-]+)(\.)([A-Z]{2,4}\b)/i', '$1 dot $3', $$text);
  11. Be sure to set your session variables before redirecting
  12. $result = preg_replace('/(\b[a-z])[a-z]+\s?/i', '$1', $subject);
  13. preg_match_all('/onclick="return false;">(.*?)<\/a>/',$data,$matches);
  14. preg_match_all('/<a href="javascript:void(0);" onclick="return false;">.*?</a>/s',$data,$matches);
  15. Try this $string = preg_replace_callback('/(ht|f)tps?:\/\/\S+/', 'trim_urls_callback', $string);
  16. This is in the wrong forum, it should be in the main PHP forum not the regex one..
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.