[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
[
List Home]
Re: [buckminster-dev] fetcher questions
|
Great - thanks!
I will include this information in the documentation.
It actually means that users have to be careful since they can't use the
* and ? operators as in a full reqular expression, and if they entered
escapes with \ on windows, this is replaced with /. If for some reason,
the names the user is trying to match requires use of other special
regexp characters - these can't be matched.
I am not saying you should change the implementation - not until someone
actually has an issue (if ever).
Regards
- henrik
Guillaume Chatelet wrote:
Hi Henrik,
I had to check before answering you : )
So it is regular expressions as you guessed but with a little bit of
tweaking so it's much easier to write.
Here is the relevant piece of code :
p = p.replace(SEP, "/");
p = p.replace(".", "\\.");
p = p.replace("*", ".*");
p = p..replace("?", ".?");
If a separator is found / or \ depending on the platform, it is
converted to /
If a dot is found it is converted to the dot character in the regular
expression : \\.
* => .*
? => .?
So it's much closer to a bash regular expression.
Guillaume
On Wed, Jul 15, 2009 at 2:49 PM, Henrik Lindberg
<henrik.lindberg@xxxxxxxxxxxxxx <mailto:henrik.lindberg@xxxxxxxxxxxxxx>>
wrote:
Guillaume Chatelet wrote:
You are absolutely right Henrik.
* include=*.cpp
Hi, finally got around to updating the actor reference. On the
wikipage that describes the fetcher, it says that 'include' uses
regular expressions, but I wonder if that is really true - in that
case, the expression above would have to be written something like
.*\.cpp.
So, is it a simpler expression - i.e. just using '*' as a wildcard?
Regards
- henrik
_______________________________________________
buckminster-dev mailing list
buckminster-dev@xxxxxxxxxxx <mailto:buckminster-dev@xxxxxxxxxxx>
https://dev.eclipse.org/mailman/listinfo/buckminster-dev