nl2br keeps producing <br /> instead of simple <br> - not that I minded in the past, as both work, but now I have to summon up my very limited regEx-skills and find <br /> - which is just not as easy.
Why is it <br /> instead of <br>?
Does anyone know a nice simple regEx for <br />?
Why <br />
Moderator: General Moderators
-
pootergeist
- Forum Contributor
- Posts: 273
- Joined: Thu Feb 27, 2003 7:22 am
- Location: UK
- twigletmac
- Her Royal Site Adminness
- Posts: 5371
- Joined: Tue Apr 23, 2002 2:21 am
- Location: Essex, UK
If you're using nl2br() then you don't have to do a regex to find <br /> if you're looking for end of lines - you can look for \n instead as the <br /> are just put next to the newline characters (\n) by nl2br().
Of course I don't know exactly what you need to match but if it is linebreaks then \n is the better and easier thing to search on.
Mac
Of course I don't know exactly what you need to match but if it is linebreaks then \n is the better and easier thing to search on.
Mac