BBCode using Preg_Replace
View Single Post
04-07-2008, 03:46 AM
Join Date: Dec 2007
Originally Posted by
"\t" is the special character for tabs, so you could do something like
perhaps, or if it's a specific amount of whitespace, such as 4 spaces, maybe
etc... does this help at all? The (.*) would be replaced with whatever else you're attemping to match, of course.
Well its the problem of a persons indentation, I've been wanting ot make a syntax highlighter, but if someone has sloppy indentation, I can't do a successful pattern replacement, it just turns black v_v.
Unless, I do separate pattern matches for each set of keywords for syntax like "if condition then else", well I could chunk it out for pattern matching :D
"The reasonable man adapts himself to the conditions that surround him... The unreasonable man adapts surrounding conditions to himself... All progress depends on the unreasonable man." - George Bernard Shaw
View Public Profile
Send a private message to Orc
Visit Orc's homepage!
Find More Posts by Orc