Jump to content

JAY6390

Members
  • Posts

    825
  • Joined

  • Last visited

Everything posted by JAY6390

  1. "~subscriberCount='(\d+)'~" and "~media:thumbnail url='([^']+)'~" That should do it
  2. <?php $xml = simplexml_load_file('http://video.news.com.au/feed.atom'); foreach( $xml->entry as $entry ) { echo "Link - {$entry->link->attributes()->href}<br>"; break; } ?> or possibly just <?php $xml = simplexml_load_file('http://video.news.com.au/feed.atom'); echo "Link - {$xml->entry[0]->link->attributes()->href}<br>"; ?>
  3. That matches your supplied data just fine and outputs c=3-024426 Clearly your input data isn't the same as what you've supplied
  4. '~<a\s+href="solo\.php\?op=nope&([^"]+)~'
  5. Couldn't you just add ? after the .+ /(Apple|Orange): (?P<extract>.+?)(\d{1,2} \w{3} \d{4})? http/ so that it's not greedy
  6. you'll only need the space in there if you want to allow spaces as well Also, you don't need the ( ) around it unless you want to capture the string (which is kinda pointless since you are supplying the string in the first place)
  7. echo preg_match("/^([A-Z0-9.,']+)$/", $string);
  8. Using just numbers (especially the time) makes it very easy to brute crack (since you just need to enter a date range and let a foreach work it's magic). It also doesn't actually satisfy the part the OP asked about NOT having 1 or 0 in the password. I know they wont have the confusion issue with 1 l and L but it's still a bad idea to have just numbers, especially based on time, or a hex/hash of that time. Its also worth noting that unless this is being done manually for each password, if a script does 20 accounts at once, they would all have the same password as time() doesn't change during the running of the script like microtime does
  9. Pretty simple tbh, use this random string function and pass in all the letters and numbers of the alphabet except for LOlo10 and also the min/max values you want, and hey presto, you have your password
  10. This is what the last regex matches, (the ones in yellow/blue are valid) http://screencast.com/t/x9PmK3VOgB5 It seems to satisfy all of your above requirements, note that two dashes in a row won't work
  11. Oops, the dash at the end hadn't been accounted for, here's the proper one ~^(?!-)(\d[\s-]?){1,}(?<!-)$~
  12. I see. OK well this should satisfy those three points ~^(?!-)(\d[\s-]?){1,}$~
  13. You can use trim to remove the dashes from either side too $new_subject = trim($subject, ' -'); To match that with regex then use if(preg_match('~^\d{3}-\d{3} \d{2}$~', $new_subject)) { // matched successfully code here } else { // Failed to match code here } This of course assumes you want to have the dash and space between the numbers exactly as you have it
  14. fair enough. didn't think you'd need that if you have it only matching url's that start user/000000-username but yeah you can add that bit on too if you like
  15. if (preg_match('%<a href="user/\d+-([^"]+)"%', $subject, $matches)) { $result = $matches[1]; } else { $result = ""; }
  16. Also, if you want the output lowercase, use strtolower()
  17. Nope, trim removes any of those characters from the start and end until it finds one that isn't in the list. It outputs f-oo-oo
  18. Since you're using php, you can forget the need for the regex at all, and just use $str = trim($str, '- '); in it's place
  19. google There's no real answer, I've learnt from all over tbh
  20. $subject = 'boolean com.xxx.xxx.xxx.setValue(int, String, String)'; if (preg_match('/([^\s]+)\s(com\.[^(]+)\.([^\.]+)\(([^)]+)\)/', $subject, $matches)) { echo 'Group 1: ' . $matches[1] . '<br />'; echo 'Group 2: ' . $matches[2] . '<br />'; echo 'Group 3: ' . $matches[3] . '<br />'; echo 'Group 4: ' . $matches[4] . '<br />'; }
  21. $subject = 'boolean com.xxx.xxx.xxx.setValue(int, String, String)'; if (preg_match('/([^\s]+)\s(com\.[^(]+)\(([^)]+)\)/', $subject, $matches)) { echo 'Group 1: ' . $matches[1] . '<br />'; echo 'Group 2: ' . $matches[2] . '<br />'; echo 'Group 3: ' . $matches[3] . '<br />'; } Output: Group 1: boolean Group 2: com.xxx.xxx.xxx.setValue Group 3: int, String, String
  22. $result = preg_replace('/(\{[a-z0-9_]+\})/i', '<span class="blah">$1</span>', $subject);
  23. Just put $result = str_replace('-', ' ', $result); After the preg_replace line
×
×
  • 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.