Jez
-
Content Count
12 -
Joined
-
Last visited
-
Days Won
1
About Me
Hello everyone I am Jeremy.
I am 29, come from North Yorkshire in the UK.
Went to Leeds University to study Computer Science and application based multimedia systems, creating network games in Flash and the like.
Have been involved in numerous projects in PHP and using MySQL as the database backend, even using Java to some degree with Oracle (the old educational versions at University being 9i).
Been working on my blog as a kind of reference for myself, doing regular expressions at the moment and just to sample something from complete memory this is the kind of stuff I have been doing just to show what I can do in PHP as such:
<?php $string = 'jeremy'; $pattern = '/j(a|e)r(a|e)my/i'; // if you use the () it makes a group of chars, if a or e, get it? you delimit or escape the chars in the pattern you want to match so i right at the end means case insensitive preg_match($pattern, $string, $matches); echo '<pre>'; print_r($matches); // think this meants print recursively through the array if any matches from the string compared to the pattern exist! echo '</pre>';
Quite essentially how you do better pattern matching in php, could using different parameters using grep_replace() etc.