[PHP] Regular Expressions Help (preg_match) Text parser2

  • Status Closed
  • Budget $30 - $250 USD
  • Total Bids 1

Project Description

Hello everyone,

Im looking for some guy that knows very well how to work with Regular Expressions under PHP5.

im going to explain what i need:

-EXAMPLE:

<?php

// I have something like this to parse (in plain text) pattern is Like *:* *:* *:* ..... where "*" can be any word(letters,numbers,(),backspaces or others) later ":" and again any word(letters,numbers,(),backspaces or others), and this will be reapeated many times...

$str = 'Something 234(asd):SomethingOther [url removed, login to view] Something 234(asd):SomethingOther [url removed, login to view] Something 234(asd):SomethingOther [url removed, login to view] Something 234(asd):SomethingOther [url removed, login to view]';

//later needs to be parsed, but this dont work for me, i need you to make this for me...

preg_match_all('/(?<item1>w+):(?<item2>w+) /', $str, $matches);

/* This also works in PHP 5.2.2 (PCRE 7.0) and later, however

* the above form is recommended for backwards compatibility */

// preg_match('/(?<item1>w+): (?<item2>w+)/', $str, $matches);

//And finally show or insert to database (with an array or smthing)

print_r($matches);

echo $item1[0]." >> ".$item2[0];

//.......... and so on...

?>

Hope you understand what i need, IF YOU CAN DO THIS PLEASE CONTACT.

im willing to pay some dollars for this, like 5-10$, (im not rich and i think wont be easy if you know how to do) :-)

Thnaks.

PS: about time to finnish job, i need asap, it only will take some mins to code.

Get free quotes for a project like this
Awarded to:

Looking to make some money?

  • Set your budget and the timeframe
  • Outline your proposal
  • Get paid for your work

Hire Freelancers who also bid on this project

    • Forbes
    • The New York Times
    • Time
    • Wall Street Journal
    • Times Online