couchdb-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dav...@apache.org
Subject [25/50] git commit: simplify regex
Date Fri, 17 Jan 2014 22:06:59 GMT
simplify regex


Project: http://git-wip-us.apache.org/repos/asf/couchdb-couch-replicator/repo
Commit: http://git-wip-us.apache.org/repos/asf/couchdb-couch-replicator/commit/7740888a
Tree: http://git-wip-us.apache.org/repos/asf/couchdb-couch-replicator/tree/7740888a
Diff: http://git-wip-us.apache.org/repos/asf/couchdb-couch-replicator/diff/7740888a

Branch: refs/heads/import
Commit: 7740888a8784807dd0b485cad5a205e9e7feee8c
Parents: 724bc86
Author: Robert Newson <robert.newson@cloudant.com>
Authored: Wed Sep 5 17:46:28 2012 +0100
Committer: Paul J. Davis <paul.joseph.davis@gmail.com>
Committed: Wed Mar 20 06:02:39 2013 -0500

----------------------------------------------------------------------
 src/couch_replicator.erl | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/couchdb-couch-replicator/blob/7740888a/src/couch_replicator.erl
----------------------------------------------------------------------
diff --git a/src/couch_replicator.erl b/src/couch_replicator.erl
index 4712490..8ebbc6e 100644
--- a/src/couch_replicator.erl
+++ b/src/couch_replicator.erl
@@ -969,7 +969,7 @@ unpack_seq(Seq) when is_number(Seq) ->
 unpack_seq([SeqNum, _]) ->
     SeqNum;
 unpack_seq(Seq) when is_binary(Seq) ->
-    Pattern = "^[\\[?]?(?<seqnum>[0-9]+)",
+    Pattern = "^\\[?(?<seqnum>[0-9]+)",
     Options = [{capture, [seqnum], list}],
     {match, [SeqNum]} = re:run(Seq, Pattern, Options),
     list_to_integer(SeqNum).


Mime
View raw message