Advertisement
Guest User

Untitled

a guest
Jun 25th, 2017
59
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 7.75 KB | None | 0 0
  1. <?php
  2.  
  3.  
  4. $string = "MEN\'S AND LADIES\' RANGER LEATHER CHAPS With an adjustable belt can also be tied in the back to achieve the \"right\" fit Covered zippered sides Easy-to-trim bottoms with hook/loop fasteners Designed by the industry\'s top designers to exceed every expectation! Made from black-dyed heavy-duty full-grain cowhide leather, carefully crafted to meet today\'s sizing standards to ensure the fit you demand and the comfort you want. Expert tailoring and meticulous detailing throughout guarantee a lifetime of service. Boot-cut leg. 2 zippered patch-front pockets. Copper-finished hardware. Shipped separately from factory. NOTE: SKU numbers ending in F are factory shipped and may take a little longer to reach you. Order Inseam Waist Thigh XXS 32-1/2 28 19-1/2 XS 33 30 20-1/2 S 33-1/2 32 21-1/2 M 34 34 22-1/2 L 34-1/2 36 23-1/2 XL 35 38 24-1/2 XXL -- 35-1/2 40 25-1/2";
  5. #$string = "706CZ MEN\'S CLASSIC LEATHER BIKER CHAPS Absolutely no effort is spared-the most comfortable chaps you\'ve ever worn! Smooth, supple, top-grain cowhide chaps feature expert tailoring and detailing throughout Stop the wind, resist abrasion and simply look great Freedom of movement-that\'s what they\'re all about! Our Classic chaps are made using only premium hand-selected leather and are top stitched for extra durability. They feature full-covered zippers, adjustable waist, alterable/trimmable inseam, front pocket and 4 bottom leg snaps. It\'s like a custom fit-you\'ll enjoy every minute in comfort. Sold in pairs. Men\'s Chaps Order Inseam Waist Thigh Calf S 33-1/2 34-1/2 24 19 M 33-1/2 36 25-1/2 20 L 33-1/2 37 26-1/2 20-1/2 XL -- 33-1/2 38 26-1/2 21";
  6. #$string = " MEN CLASSIC LEATHER BIKER CHAPS Absolutely no effort is spared-the most comfortable chaps you\'ve ever worn! Smooth, supple, top-grain cowhide chaps feature expert tailoring and detailing throughout Stop the wind, resist abrasion and simply look great Freedom of movement-that\'s what they\'re all about! Our Classic chaps are made using only premium hand-selected leather and are top stitched for extra durability. They feature full-covered zippers, adjustable waist, alterable/trimmable inseam, front pocket and 4 bottom leg snaps. It\'s like a custom fit-you\'ll enjoy every minute in comfort. Sold in pairs. Men\'s Chaps Order Inseam Waist Thigh Calf S 33-1/2 34-1/2 24 19 M 33-1/2 36 25-1/2 20 L 33-1/2 37 26-1/2 20-1/2 XL -- 33-1/2 38 26-1/2 21";
  7. #$string = "M10066 MEN\'S AND LADIES\' GUNSLINGER LEATHER CHAPS With an adjustable belt can also be tied in the back to achieve the \"right\" fit Covered zippered sides Easy-to-trim bottoms with 4 snaps Designed by the industry\'s top designers to exceed every expectation! Made from black-dyed heavy-duty full-grain cowhide leather, carefully crafted to meet today\'s sizing standards to ensure the fit you demand and the comfort you want. Expert tailoring and meticulous detailing throughout guarantee a lifetime of service. Full-cut leg with ribbed inseam for a comfortable fit. One zippered inset pocket and one regular pocket. Order Inseam Waist Thigh XXS 32-1/2 28 19-1/2 XS 33 30 20-1/2 S 33-1/2 32 21-1/2 M 34 34 22-1/2 L 34-1/2 36 23-1/2 XL 35 38 24-1/2 XXL -- 35-1/2 40 25-1/2";
  8. $string = "GENUINE DO-WRAP WINTER BANDANA -- Elasticized cotton headwear fits great and can be worn or removed without the need to retie it every time you put it on Choose winter or regular bandanas or headbands Stylish?wear it alone or comfortably under your helmet Winter bandanas have extended front and sides to cover more of the forehead and to cover ears; sewn-in polar fleece interior panels act as soft, warm ear muffs. All tie in back. Machine washable. One size fits all.";
  9. $string = "NEOFORM&trade; BEAM WIPER BLADES WITH TEFLON&reg; -- The latest in wiper technology...now better than ever! Heat-treated spring steel beam helps wiper conform to windshield contours Exclusive Teflon&reg; resin element provides a smoother wipe, longer life Test proven to outperform traditional blades in snow and ice Aerodynamic spoiler minimizes wind lift and looks great Sleek, modern styling to complement today's vehiclesKit contains 2 wipers for both driver and passenger sides and you save $1 Patented, twin-point coupler delivers constant, even pressure across the entire windshield for a smoother, more consistent wipe. Most wiper blades have only six or eight pressure points while the NeoForm&trade; blade has an infinite number of points! Skin coating seals the spoiler for all-weather protection against the elements. No exposed parts means less chance of snow/ice clogging in winter. Jointless structure maximizes efficiency and durability while the special hinge design ensures a quieter, smoother wipe and less chance of permanent blade set. Preassembled connectors fit most popular arm styles. Available in 16\" to 28\" lengths.";
  10. #$string = "CHROMED FENDER TIP ACCENT -- Custom-fit, custom designed tip accents sport triple showroom chrome plating Crafted from die-cast metal (not plastic) for style and durability. Accents wrap around the sides and tip of fender and feature a raised center section for added style. Factory-like concealed bolt-on installation (all hardware and instructions included). Some drilling required.";
  11. #$string  = " MAX ATF TRANSMISSION FLUID Reduces friction to help get smoother shifts. Suitable for Dextron Type III or Mercon III -- applications. Withstands extreme heat. Fully compatible, nonfoaming and extreme-heat stable. One quart.";
  12. $string = "TOURING HEAVY DUTY&trade; WINDSHIELDS Rake and height completely adjustable to your riding style Windshields available with or without adjustable headlight window For Honda, Kawasaki, Suzuki, Yamaha cruisers and Harley Davidson Adds classic style to your vehicle. Provides maximum protection from wind and insects...without obstructing vision! Contoured for looks and better aerodynamic airflow. Shatter resistant (meet or exceed DOT specifications) and light grey tint. Chrome-plated outer trim strips add a nostalgic touch while reinforcing windshields to resist high-speed movement. Non-glare black-coated inner strips. Hardware allows height adjustment by sliding mount up or down fork tubes (except on models with original-equipment fork covers). Quantum&trade; coating takes motorcycle windshields a quantum leap forward in abrasion resistance and lifespan. National Cycle applies this crystal clear, hardcoating to GE Lexan&reg; polycarbonate material. The combined result is the strongest, most abrasion resistant windshield material available worldwide, with 10X the abrasion resistance of FMR -- coating (measured with the Tabor Abrasion Test).";
  13. #$string = "Cylinder Shrouds And Engine Hardware Kit Perfect Replacement For Original Or Great Add-on Accessories Available In 2 Finishes-chrome Or Black For Volkswagens With Type I Or Type II -- engine";
  14. $string = "TIMING BELTS -- Perfect, quality-made replacements for originals! Replace torn or damaged belt and help restore like-new performance";
  15. var_dump($string);
  16.  
  17.  
  18. function catchallwords($string) {
  19.    
  20.         $string = stripslashes($string);
  21.         preg_match_all('/&([a-z]+);/',$string,$matches2);
  22.         #preg_match('/[_A-Z]+.*?[^&_a-z]+ \b/s',$string,$matches);
  23.         foreach($matches2[1] as $val)
  24.         {
  25.             $string = str_replace("&{$val};","<<< ".strtoupper($val)." >>>",$string);
  26.         }
  27.        
  28.        
  29.         preg_match('/[_A-Z]+.*?[^&_a-z]+ \b/s',$string,$matches);
  30.         $string = $matches[0];
  31.        
  32.         foreach($matches2[1] as $val)
  33.         {
  34.             $string = str_replace("<<< ".strtoupper($val)." >>>","&{$val};",$string);
  35.         }
  36.         $original_string = $string;
  37.         $string = ucwords(strtolower($string));
  38.         return array($original_string,$string);
  39.        
  40.    
  41.    
  42. }
  43.  
  44.  
  45.    
  46.     $string_to_replace = catchallwords($string);
  47.     echo "<pre>",print_r($string_to_replace),"</pre>";
  48.     $string = str_replace($string_to_replace[0],$string_to_replace[1],$string);
  49.     var_dump($string);
  50.  
  51.  
  52.  
  53. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement