I was given a regex to search through logs with. However, it works in their search but not in PHP. I'm bad with regex, and have no clue what’s wrong with it.
Their regex "\\] ([a-zA-Z _]+) \\(.*to ([a-zA-Z _]+) \\(.*\\$([0-9,]+)"
Warning: preg_match_all() [function.preg-match-all]: Delimiter must not be alphanumeric or backslash
I need assistance in getting this to work in PHP.
An example of the logs is:
[2013/12/28 - 15:16:22] Zack Willson (IP: 127.0.0.1) has sold their house (ID 4681) to William Hill (IP: 127.0.0.1) for $13,700,000.
I need to obtain the first players name, the second players name, and the amount it cost. If that regex isn't easily converted or whatever the issue may be.