Permalink
Browse files

simplify regex

  • Loading branch information...
1 parent d7cefb9 commit 067d24448b34b7e270fbed863e079e063b633fa2 Robert Newson committed Sep 5, 2012
Showing with 1 addition and 1 deletion.
  1. +1 −1 src/couch_replicator.erl
View
@@ -966,7 +966,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).

0 comments on commit 067d244

Please sign in to comment.