[TriLUG] [hopefully] quickie help with a regex

Warren Myers volcimaster at gmail.com
Sun Aug 8 22:35:47 EDT 2010


Good evening,

I'm looking to match text inside single quotes using PHP (technically this
text is in XML/HTML documents (and yes, I know regexes are bad for HTML, but
in this instance, it's what I need)), but am having a little trouble with
the formatting.

I *think* what I want is:
    [\'][.]*]\']

Is that right, or am I way off? It seems to only match sometimes.

Thanks,
-Warren

-- 
Warren Myers
http://warrenmyers.com
http://twitter.com/volcimaster
http://www.linkedin.com/in/warrenmyers



More information about the TriLUG mailing list