that is rite, thank you 
I got some spacing before the bracket is that a known reason
PHP Code:
<?php
$string = 'item { here;';
$pattern = '/s*\{\s*/';
$replacement = '${1}{$2';
$newstring = preg_replace($pattern, $replacement, $string);
?>
<textarea><?php echo $string; ?></textarea>
<textarea><?php echo $newstring; ?></textarea>
Code:
$pattern = '/.s*\{\s*/';
Okay the Period seems to work there (unless its two spaces or more)
I think I need to use a + (The + (plus) matches the previous character 1 or more times, for example, tre+ will find tree and tread but not trough.)
Bookmarks