php - regex- preg_replace - space after line-break!
- by aSeptik
Hi all guys!
still on regex! i want learn it but i'm still crashing the head into my keybord! ;-)
ok very trivial for you, i'm sure!
Assuming i have this sting, the \s is where the space actualy is... \n where linebreak is..
DESCRIPTION: The quick brown fox jum`\s\n`
`\s`ps over the lazy dog
now, what i need to do is remove All the space after the A-Z:
that i have achieved by this regex: /\s+(?![A-Z:])/m that produce this result
DESCRIPTION: The quick brown fox jum ps over the lazy dog
as you can see it leave the space between jum and ps
how to have a result like this?
DESCRIPTION: The quick brown fox jumps over the lazy dog
thank's for the time!