Skip to content
This repository has been archived by the owner on Oct 22, 2021. It is now read-only.

Commit

Permalink
simplify regex
Browse files Browse the repository at this point in the history
  • Loading branch information
Robert Newson committed Sep 5, 2012
1 parent d7cefb9 commit 067d244
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/couch_replicator.erl
Original file line number Diff line number Diff line change
Expand Up @@ -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.