$re = '/\"_id\": {\n[\s]+.+\n\s+},\n/';
$str = '{
"_id": {
"$oid": "56ccbf1f134dbd493774bedf"
},
"name": "ACME Manufacturing Company Ltd.",
"description": "We are the best manufacturers in the world ever!!!",
"url": "https://somewhere.com",
"telephone": "0123456789",
"email": "someone@somewhere.com",
"media": [{
"rel": "video",
"url": "http://someurl.com/media/video.mp4",
"type": "video/mp4",
"_id": {
"$oid": "56ccbf1f134dbd493774bee0"
}
}],
"industries": [],
"materials": ["steel", "stainless steel"],
"treatments": [],
"services": ["milling", "cnc"],
"categories": ["engineering", "machining"],
"loc": {
"type": "Point",
"coordinates": [34.781767999999999574, 32.085299999999996601]
},
"address": {
"type": "PostalAddress",
"addressCountry": "Israel",
"addressLocality": "Tel Aviv",
"addressRegion": "Tel Aviv District",
"postalCode": "6103000"
},
"cover": {
"rel": "cover",
"url": "https://upload.wikimedia.org/wikipedia/commons/a/a3/Schweizerische_Bauzeitung_Oktober_1909.jpg",
"type": "image/jpeg"
},
"__v": 0
} {
"_id": {
"$oid": "56ccbf1f134dbd493774bee1"
},
"name": "Bill\'s Manufacturing Company",
"description": "What an amazing manufacturing company we are",
"url": "https://billsmanufacturing.com",
"telephone": "012345678998",
"email": "someone@billsmanufacturing.com",
"media": [{
"rel": "video",
"url": "http://someurl.com/media/billspromo.mp4",
"type": "video/mp4",
"_id": {
"$oid": "56ccbf1f134dbd493774bee2"
}
}],
"industries": [],
"materials": ["steel", "stainless steel"],
"treatments": [],
"services": ["milling", "turning"],
"categories": ["engineering", "machining"],
"loc": {
"type": "Point",
"coordinates": [-0.12775800000000001044, 51.507350999999999885]
},
"address": {
"type": "PostalAddress",
"addressCountry": "UK",
"addressLocality": "London",
"addressRegion": "Greater London",
"postalCode": "SW1 2WE"
},
"cover": {
"rel": "cover",
"url": "",
"type": "image/jpeg"
},
"__v": 0
} {
"_id": {
"$oid": "56ccbf1f134dbd493774bee3"
},
"name": "Laymans 3D Construction Plc.",
"description": "3D Printing and much more",
"url": "https://laymans3d.com",
"telephone": "08547772566",
"email": "someone@laymans3d.com",
"media": [{
"rel": "video",
"url": "http://someurl.com/media/laymanspromo.mp4",
"type": "video/mp4",
"_id": {
"$oid": "56ccbf1f134dbd493774bee4"
}
}],
"industries": [],
"materials": ["steel", "stainless steel"],
"treatments": [],
"services": ["3d printing", "laser cutting"],
"categories": ["engineering", "machining"],
"loc": {
"type": "Point",
"coordinates": [-122.41941599999999823, 37.774929000000000201]
},
"address": {
"type": "PostalAddress",
"addressCountry": "USA",
"addressLocality": "CA",
"addressRegion": "California",
"postalCode": "90210"
},
"cover": {
"rel": "cover",
"url": "http://someurl.com/media/laymans.jpeg",
"type": "image/jpeg"
},
"__v": 0
} {
"_id": {
"$oid": "56ccc054134dbd493774bee7"
},
"name": "Bending Technologies",
"description": "Bending Technologies, Inc. has been fabricating metal parts for over 50 years. Our depth of knowledge and progressive approach to the market allows us to find creative solutions to tough problems. Our manufacturing team is expert at eliminating obstacles to your quest for high quality, low tolerance parts\\n\\nWe have many long tenured employees due to our low turnover rate. Our employee’s cross-train and can manage multiple tasks. In addition, we have experience managing Kan Ban, or similar, programs for our customers.\\n\\nTube bending of carbon steel, stainless steel and aluminum is our core business.\\n\\nOur equipment includes CNC tube benders, manual tube benders, manual welders, robotic welders, high speed cut offs, trim saws, mills, and drill presses, housed in our 35,000 square foot facility.\\n\\nWe follow military standards: Inspection – I-45208A and Calibration – 45662A, and closely follow ISO standards. Our service, quality, and flexibility are superior to our competitors. \\n\\nWe have extensive experience with frame related products, fluid transfer, skid loader style vehicles, and dramatic success with fitting tight tolerance tubes into castings. In addition to these manufacturing capabilities, we have provided design assistance, special delivery programs, and cost reduction partnerships.\\n\\nWe have produced many high volume, geometrically close tolerance items. Specifically, fitting tubes into castings. We provide value added services with finishing and light assembly. \\n\\nWe run 98%+ on time delivery. We have had rejected parts but these are normally caught at our facility before shipping. We are owned by a large and stable conglomerate that backs us up and lets us focus on our core business, tube bending.\\n\\nWe serve agricultural, medical, fluid transfer, recreational products, furniture, and industrial equipment markets.",
"url": "www.bendingtech.com",
"telephone": "+1-952-946-1018",
"email": "",
"media": [],
"industries": [],
"materials": [],
"treatments": [],
"services": ["fabrication", "tube modification", "bending", "welding or bonding", "structural fabrication", "swaging", "tube bending", "other tube processing", "cutting-other", "cutting,"],
"categories": [],
"loc": {
"type": "Point",
"coordinates": [-93.379020799999977953, 44.900524300000000721]
},
"address": {
"type": "PostalAddress",
"streetAddress": "Eden Prairie Road",
"addressLocality": "Edina",
"addressRegion": "Minnesota",
"addressCountry": "United States",
"postalCode": "55436"
},
"__v": 0
} {
"_id": {
"$oid": "56ccc054134dbd493774bee8"
},
"name": "Augusta Machine & Welding, Inc",
"description": "AMW has been serving industry with quality parts since 1974\\n \\nWhether machining, welding, or fabricating, AMW completes assignments and always makes your machine or fabrications work.\\n \\n \\nSince 1974, Augusta Machine & Welding Center (AMW) has been providing industrial machine shop and machine works services as well as field machine shop services to industry, large and small. Our services include fabrication, machining, machine turning , milling and tool repair, welding (Stick, Dual Shield, Mig & Tig), rebuilds, tooling, crane services, and more. We can machine, weld, cut, bend, fabricate, duplicate, copy and create most anything made out of any metal.",
"url": "www.a-m-w.com",
"telephone": "+1-706-790-7820",
"email": "",
"media": [],
"industries": [],
"materials": [],
"treatments": [],
"services": ["fabrication", "machining", "other assembly", "bending", "welding or bonding", "drawing", "lay-up", "other fabrication", "punching", "slitting", "structural fabrication", "reaming", "5 axis milling", "chemical machining", "deep hole drilling", "machining of castings", "micro-drilling", "milling", "other machining", "screwswiss machining", "turning", "filament winding", "electric discharge", "milling & turning", "cutting", "forming", "shaping,"],
"categories": [],
"loc": {
"type": "Point",
"coordinates": [-93.379020799999977953, 44.900524300000000721]
},
"address": {
"type": "PostalAddress",
"streetAddress": "Eden Prairie Road",
"addressLocality": "Edina",
"addressRegion": "Minnesota",
"addressCountry": "United States",
"postalCode": "55436"
},
"__v": 0
} {
"_id": {
"$oid": "56ccc055134dbd493774bee9"
},
"name": "Dynamic Manufacturing & Engineering LLC",
"description": "DYNAMIC IS A LOCALLY OWNED MANUFACTURING COMPANY IN TUCSON AZ, DEDICATED TO CUSTOMER RELATIONSHIPS. DYNAMIC WAS ESTABLISHED IN 2003 TO PUT OUR MANUFACTURING EXPERTISE TO WORK IN AN INNOVATIVE WAY. WE STRIVE TO MEET OUR CUSTOMERS EXPECTATIONS FROM QUALITY TO DELIVERY. OUR COMPANY SPECIALIZES IN THE FABRICATION OF MACHINED COMPONENTS WITH EXTREMELY SHORT LEAD TIMES.",
"url": "http://www.dmeaz.com",
"telephone": "+1-520-664-2210",
"email": "",
"media": [],
"industries": [],
"materials": [],
"treatments": [],
"services": ["assembly", "cable assembly", "gluing", "hose assembly", "mechanical assembly", "other assembly", "soldering", "welding", "wire harness assembly", "bending", "welding or bonding", "drawing", "lay-up", "other fabrication", "punching", "slitting", "structural fabrication", "reaming", "5 axis milling", "chemical machining", "deep hole drilling", "machining of castings", "micro-drilling", "milling", "other machining", "screwswiss machining", "turning", "electronics assembly", "filament winding", "electric discharge", "milling & turning", "cutting", "forming", "shaping,"],
"categories": [],
"loc": {
"type": "Point",
"coordinates": [-81.975299500000005537, 33.380425000000002456]
},
"address": {
"type": "PostalAddress",
"addressLocality": "Augusta",
"addressRegion": "Georgia",
"addressCountry": "United States",
"postalCode": "30906"
},
"__v": 0
} {
"_id": {
"$oid": "56ccc056134dbd493774beea"
},
"name": "PITTSBURGH VALVE & FITTING",
"description": "PITTSBURGH VALVE & FITTING is a Distributor of Industrial Products located in PITTSBURGH, Pennsylvania, USA.",
"url": "http://www.swagelok.com/pittsburgh",
"telephone": "+1-412-761-3212",
"email": "",
"media": [],
"industries": [],
"materials": [],
"treatments": [],
"services": ["hose assembly", "mechanical assembly", "other assembly", "welding", "engineering design", "other engineering services", "product & package design", "reverse engineering", "bending", "welding or bonding", "drawing", "other fabrication", "punching", "structural fabrication", "flow fittings", "misc. fittings", "valves", "hose & pipe fittings", "ball valves", "butterfly valves", "check valves", "control valves", "diaphragm valves", "gate valves", "globe valves", "needle valves", "pinch valves", "plug valves", "relief valves", "vacuum breaker valves", "x - misc. valves", "custom cutting tools", "electro-valve", "manual valve", "cutting,"],
"categories": [],
"loc": {
"type": "Point",
"coordinates": [-110.96258539999996628, 32.148565599999997744]
},
"address": {
"type": "PostalAddress",
"addressLocality": "Tucson",
"addressRegion": "Arizona",
"addressCountry": "United States",
"postalCode": "85706"
},
"__v": 0
} {
"_id": {
"$oid": "56ccc056134dbd493774beeb"
},
"name": "Gibson Welding Sheet Metal",
"description": "Gibson Welding Sheet Metal is a Job Shop / Contract Manufacturer located in Destin, Florida, USA.",
"url": "null",
"telephone": "+1-850-837-6141",
"email": "",
"media": [],
"industries": [],
"materials": [],
"treatments": [],
"services": ["fabrication", "bending", "welding or bonding", "drawing", "lay-up", "other fabrication", "punching", "slitting", "structural fabrication", "filament winding", "cutting", "forming,"],
"categories": [],
"loc": {
"type": "Point",
"coordinates": [-80.060344499999985146, 40.497453200000002482]
},
"address": {
"type": "PostalAddress",
"addressLocality": "Pittsburgh",
"addressRegion": "Pennsylvania",
"addressCountry": "United States",
"postalCode": "15202"
},
"__v": 0
} {
"_id": {
"$oid": "56ccc057134dbd493774beec"
},
"name": "Spencer\'s Machine",
"description": "Quality work. On-Time delivery. Integrity in service. James Spencer - owner of Spencer\'s Machine is a highly qualified machinist with over 32 years experience.\\n \\nSpencer\'s Machine specializes in CNC mill work,sawing,NC plasma cutting and has been in business since 1989.\\n \\n\\nSpencer\'s Machine is a certified United States government supplier with an excellent delivery and quality rating.",
"url": "null",
"telephone": "+1-817-279-2483",
"email": "",
"media": [],
"industries": [],
"materials": [],
"treatments": [],
"services": ["mechanical assembly", "other assembly", "welding", "bending", "welding or bonding", "lay-up", "other fabrication", "punching", "slitting", "structural fabrication", "reaming", "deep hole drilling", "machining of castings", "micro-drilling", "milling", "other machining", "filament winding", "milling & turning", "cutting", "shaping,"],
"categories": [],
"loc": {
"type": "Point",
"coordinates": [-86.49578329999997095, 30.393533699999998987]
},
"address": {
"type": "PostalAddress",
"addressLocality": "Destin",
"addressRegion": "Florida",
"addressCountry": "United States"
},
"__v": 0
} {
"_id": {
"$oid": "56ccc057134dbd493774beed"
},
"name": "Timco",
"description": "Timco Blasting & Coatings is a business that is constantly working to stay ahead of the curve, which is imperative in today\'s fast-paced and competitive environment. That is what sets Timco apart from its competition.\\n \\nWe started as a professional blasting and coating business in 1989 and have formed into a company that performs much more than just blasting and coating. Please visit our services page to view a list of our capabilities.\\n \\nTimco has the capabilities and resources to provide proper job coordination, and has a highly qualified quality control team. Timco has certified welders on staff and is C3 and C5 certified in de-leading of industrial structures. Timco has provided services in extremely secure locations, and all employees have satisfactorily completed background checks and drug screenings.\\n \\nOur employees and management personnel take great pride in providing a quality product and always go the extra mile to ensure safety and customer satisfaction are held as the TOP priorities. We provide prompt, courteous, and professional service that is designed to meet the customers\' time, budget, and needs.",
"url": "http://www.timcoblastingandcoating.com",
"telephone": "+1-918-645-9148",
"email": "",
"media": [],
"industries": [],
"materials": [],
"treatments": [],
"services": ["mechanical assembly", "other assembly", "welding", "bending", "welding or bonding", "other fabrication", "punching", "structural fabrication", "cutting", "forming,"],
"categories": [],
"loc": {
"type": "Point",
"coordinates": [-97.794196699999986322, 32.442082599999999104]
},
"address": {
"type": "PostalAddress",
"addressLocality": "Granbury",
"addressRegion": "Texas",
"addressCountry": "United States"
},
"__v": 0
} {
"_id": {
"$oid": "56ccc058134dbd493774beee"
},
"name": "Absolute Custom Extrusion",
"description": "Absolute Custom Extrusion is a Supplier located in w, Wisconsin, USA.",
"url": "http://ace-extrusions.com",
"telephone": "+1-414-332-1813",
"email": "",
"media": [],
"industries": [],
"materials": [],
"treatments": [],
"services": ["fabrication", "bending", "welding or bonding", "drawing", "lay-up", "other fabrication", "punching", "slitting", "structural fabrication", "extrusions", "direct extrusion", "other extrusion", "filament winding", "thermoplastics", "thermosets", "buyer specified plastic or rubber", "indirect extrusion", "cutting", "forming", "other plastics & rubber,"],
"categories": [],
"loc": {
"type": "Point",
"coordinates": [-96.658072599999968588, 35.748679799999997897]
},
"address": {
"type": "PostalAddress",
"addressLocality": "Stroud",
"addressRegion": "Oklahoma",
"addressCountry": "United States"
},
"__v": 0
} {
"_id": {
"$oid": "56ccc058134dbd493774beef"
},
"name": "RC Sales & Manufacturing, Inc",
"description": "RC Sales & Manufacturing is a small, employee-owned corporation with a vast area of capabilities to offer. We are available to engineer prototype , production , general machining work. We specialize in MACHINING OF PLASTICS, We strive for accuracy, and are able to hold close tolerances. The end user\'s complete satisfaction is our first and foremost goal.",
"url": "http://www.rcsmfg.com",
"telephone": "+1-815-645-8898",
"email": "",
"media": [],
"industries": [],
"materials": [],
"treatments": [],
"services": ["fabrication", "machining", "bending", "welding or bonding", "drawing", "lay-up", "other fabrication", "punching", "slitting", "structural fabrication", "milling", "turning", "filament winding", "milling & turning", "cutting", "forming,"],
"categories": [],
"loc": {
"type": "Point",
"coordinates": [-88.173153099999979077, 45.65121899999999755]
},
"address": {
"type": "PostalAddress",
"streetAddress": "3rd",
"addressLocality": "Dunbar",
"addressRegion": "Wisconsin",
"addressCountry": "United States",
"postalCode": "54119"
},
"__v": 0
} {
"_id": {
"$oid": "56ccc059134dbd493774bef0"
},
"name": "Bluwind Group, LLC",
"description": "We are a group of Manufacturers supplying precision CNC multi-axis machining; Precision assembly; Heavt and Light Metal Fabrication; Precision Sheet Metal; Accumulators and Separators; and Investment and Die Casting of ferrous and non-ferrous metals. We also specialize in post sintered fabrication of industrial carbide and ceramic components with green machining on selected materials.",
"url": "http://www.bluwindgroup.com",
"telephone": "+1-518-314-9007",
"email": "",
"media": [],
"industries": [],
"materials": [],
"treatments": [],
"services": ["mechanical assembly", "welding", "die casting", "investment casting", "other casting", "bending", "welding or bonding", "other fabrication", "punching", "structural fabrication", "reaming", "cylindrical grinding", "surface grinding", "5 axis milling", "machining of castings", "micro-drilling", "milling", "other machining", "screwswiss machining", "turning", "electric discharge", "milling & turning", "cutting", "forming", "shaping,"],
"categories": [],
"loc": {
"type": "Point",
"coordinates": [-89.179270599999995284, 42.107247499999999718]
},
"address": {
"type": "PostalAddress",
"addressLocality": "Stillman Valley",
"addressRegion": "Illinois",
"addressCountry": "United States",
"postalCode": "61084"
},
"__v": 0
} {
"_id": {
"$oid": "56ccc059134dbd493774bef1"
},
"name": "Data Machine, LLC.",
"description": "Founded in 1983 by its President, Harry A. Miller, Data Machine, Inc. has evolved from a small operation to a high quality, fully staffed, state-of-the-art facility. Experience and expertise have grown along with the physical plant of the facility. Since the beginning, DMI has been committed to fabricating the highest quality machined components possible.\\nIn addition to our highly trained engineering and machining staff, our inventory \\t\\t\\t\\t of cutting-edge CNC Mazak® manufacturing equipment insures that the customers concepts of today can be a reality tomorrow. Our belief that quality parts can only come from quality methods, defines our philosophy that all of our assets should be used to assure and deliver outstanding performance.",
"url": "null",
"telephone": "+1-724-864-4370",
"email": "",
"media": [],
"industries": [],
"materials": [],
"treatments": [],
"services": ["paint", "electropolishing", "powder coating", "thermoplastics", "alloy steel", "carbon steel", "stainless steel", "tool steel", "aluminum", "brass", "bronze", "copper", "magnesium", "nickel", "surface treating", "cutting,"],
"categories": [],
"loc": {
"type": "Point",
"coordinates": [-74.343746699999996963, 43.052850599999999304]
},
"address": {
"type": "PostalAddress",
"addressLocality": "Gloversville",
"addressRegion": "New York",
"addressCountry": "United States"
},
"__v": 0
} {
"_id": {
"$oid": "56ccc05a134dbd493774bef2"
},
"name": "JSM Fabrication",
"description": "JSM Fabrication is a located in South Beloit, Illinois, USA.",
"url": "null",
"telephone": "+1-815-389-3166",
"email": "",
"media": [],
"industries": [],
"materials": [],
"treatments": [],
"services": ["bending", "welding or bonding", "drawing", "lay-up", "other fabrication", "punching", "slitting", "structural fabrication", "filament winding", "alloy steel", "carbon steel", "iron", "stainless steel", "tool steel", "buyer specified ferrous metal", "aluminum", "brass", "bronze", "cobalt", "copper", "lead", "magnesium", "nickel", "tin", "titanium", "zinc", "buyer specified non-ferrous metal", "cutting", "forming", "other ferrous metals", "other non-ferrous metals,"],
"categories": [],
"loc": {
"type": "Point",
"coordinates": [-79.70115490000000591, 40.324513799999998298]
},
"address": {
"type": "PostalAddress",
"addressLocality": "Irwin",
"addressRegion": "Pennsylvania",
"addressCountry": "United States",
"postalCode": "15642"
},
"__v": 0
} {
"_id": {
"$oid": "56ccc05a134dbd493774bef3"
},
"name": "PHE Mechanical Inc.",
"description": "PHE Mechanical Inc. is a Job Shop / Contract Manufacturer located in , Utah, USA.",
"url": "null",
"telephone": "+1-8014159154",
"email": "",
"media": [],
"industries": [],
"materials": [],
"treatments": [],
"services": ["bending", "welding or bonding", "drawing", "lay-up", "other fabrication", "punching", "slitting", "structural fabrication", "filament winding", "cutting", "forming,"],
"categories": [],
"loc": {
"type": "Point",
"coordinates": [-89.03677629999998544, 42.493070799999998144]
},
"address": {
"type": "PostalAddress",
"addressLocality": "South Beloit",
"addressRegion": "Illinois",
"addressCountry": "United States"
},
"__v": 0
}';
preg_match($re, $str, $matches, PREG_OFFSET_CAPTURE, 0);
// Print the entire match result
var_dump($matches);
Please keep in mind that these code samples are automatically generated and are not guaranteed to work. If you find any syntax errors, feel free to submit a bug report. For a full regex reference for PHP, please visit: http://php.net/manual/en/ref.pcre.php