diff options
author | Niclas Eklund <[email protected]> | 2010-11-01 10:54:41 +0100 |
---|---|---|
committer | Niclas Eklund <[email protected]> | 2010-11-01 10:54:41 +0100 |
commit | ff182ad7f0b4422f961b4b5336b747cc9f3b2cdf (patch) | |
tree | 77ec33f4e2b40d8050152ce555160efb06d8f1cf /lib/cosNotification/src/cosNotification_Filter.erl | |
parent | 95188ca3a848a1bcb1412d922eb6b13deccf9267 (diff) | |
parent | 7fce62fb8dfcf964111ce8c3254a41ce450ad0b6 (diff) | |
download | otp-ff182ad7f0b4422f961b4b5336b747cc9f3b2cdf.tar.gz otp-ff182ad7f0b4422f961b4b5336b747cc9f3b2cdf.tar.bz2 otp-ff182ad7f0b4422f961b4b5336b747cc9f3b2cdf.zip |
Merge branch 'maint-r14' into dev
Diffstat (limited to 'lib/cosNotification/src/cosNotification_Filter.erl')
-rw-r--r-- | lib/cosNotification/src/cosNotification_Filter.erl | 32 |
1 files changed, 16 insertions, 16 deletions
diff --git a/lib/cosNotification/src/cosNotification_Filter.erl b/lib/cosNotification/src/cosNotification_Filter.erl index dd3b5beb93..7201f7d6e2 100644 --- a/lib/cosNotification/src/cosNotification_Filter.erl +++ b/lib/cosNotification/src/cosNotification_Filter.erl @@ -2,7 +2,7 @@ %% %% %CopyrightBegin% %% -%% Copyright Ericsson AB 1999-2009. All Rights Reserved. +%% Copyright Ericsson AB 1999-2010. All Rights Reserved. %% %% The contents of this file are subject to the Erlang Public License, %% Version 1.1, (the "License"); you may not use this file except in @@ -877,9 +877,9 @@ check_wildcard(Types, Which, WC, Domain, Type) -> end, check_types(Types, Which, NewWC). -%% Change '*' to '.*', see regexp:parse/2 documentation. +%% Change '*' to '.*', see re:compile/1 documentation. convert_wildcard([], Acc) -> - case regexp:parse(lists:reverse(Acc)) of + case re:compile(lists:reverse(Acc)) of {ok, Expr} -> Expr; _ -> @@ -900,37 +900,37 @@ match_types(_, _, []) -> false; match_types(Domain, Type, [{domain, WCDomain, Type}|T]) -> L=length(Domain), - case catch regexp:matches(Domain, WCDomain) of - {match, []} -> + case catch re:run(Domain, WCDomain) of + nomatch -> match_types(Domain, Type, T); - {match, [{1, L}]} -> + {match, [{0, L}]} -> true; _-> match_types(Domain, Type, T) end; match_types(Domain, Type, [{type, Domain, WCType}|T]) -> L=length(Type), - case catch regexp:matches(Type, WCType) of - {match, []} -> + case catch re:run(Type, WCType) of + nomatch -> match_types(Domain, Type, T); - {match, [{1, L}]} -> + {match, [{0, L}]} -> true; _-> match_types(Domain, Type, T) end; match_types(Domain, Type, [{both, WCDomain, WCType}|T]) -> L1=length(Domain), - case catch regexp:matches(Domain, WCDomain) of - {match, []} -> + case catch re:run(Domain, WCDomain) of + nomatch -> match_types(Domain, Type, T); - {match, [{1, L1}]} -> + {match, [{0, L1}]} -> L2=length(Type), - case catch regexp:matches(Type, WCType) of - {match, []} -> + case catch re:run(Type, WCType) of + nomatch -> match_types(Domain, Type, T); - {match, [{1, L2}]} -> + {match, [{0, L2}]} -> true; - _-> + _ -> match_types(Domain, Type, T) end; _-> |