|
Posted by gfrith on 02/06/07 13:10
Hi,
A quick regex question which I've worked around for the time being,
but would like an answer to if anyone can help.
I want to match on all strings which end _id, but not those ending
row_id.
Some sample strings:
row_id
parent_id
person_id
person
I'd like to match all but the 1st and last.
I've tried many variants, including
preg_match('/(row)\w{0}_id$/',$subject);
preg_match('/(row){0}_id$/',$subject);
preg_match('/(?!row)_id$/',$subject);
None work correctly. As I say I've worked around this issue as I have
very little time, but would like to know the proper solution.
Thanks in advance. Greg.
Navigation:
[Reply to this message]
|