[TriLUG] [hopefully] quickie help with a regex

Thomas Ingram thomas at ravinggenius.com
Sun Aug 8 22:53:07 EDT 2010


Disclaimer: I am nothing close to an expert with regular expressions. Also
it has been a while since I've worked specifically with PHP's regex engine.

I think the regex you are looking for is closer to:

\'.*\'

At any rate your regex looks like it has unmatched brackets.

On Aug 8, 2010 10:36 PM, "Warren Myers" <volcimaster at gmail.com> wrote:

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
--
This message was sent to: Thomas Ingram <thomas at ravinggenius.com>
To unsubscribe, send a blank message to trilug-leave at trilug.org from that
address.
TriLUG mailing list : http://www.trilug.org/mailman/listinfo/trilug
Unsubscribe or edit options on the web  :
http://www.trilug.org/mailman/options/trilug/thomas%40ravinggenius.com
TriLUG FAQ          : http://www.trilug.org/wiki/Frequently_Asked_Questions



More information about the TriLUG mailing list