How to properly formulate search for a maintainer?
Ryan Schmidt
ryandesign at macports.org
Wed Oct 27 14:28:08 PDT 2010
On Oct 27, 2010, at 16:25, Marko Käning wrote:
> On Oct 27, 2010, at 11:23 PM, Ryan Schmidt wrote:
>
>> port echo 'maintainer:(\W|^)mk(\W|$)'
>
> Thanks Ryan for clarifying this one!
So yes. You can use regular expression syntax.
And actually \s is better than \W.
You might think you could just do:
port echo 'maintainer:^mk$'
But this matches the entire maintainer line, not each maintainer on the line individually; this wouldn't catch ports that you maintain with openmaintainer or with another maintainer. So you really want:
port echo 'maintainer:(\s|^)mk(\s|$)'
So this says to match whitespace or beginning of line, then "mk", then whitespace or end of line.
More information about the macports-dev
mailing list