Skip to content

Commit

Permalink
better lcc regex
Browse files Browse the repository at this point in the history
  • Loading branch information
ornicar committed Jun 21, 2024
1 parent 8334bd2 commit 1cb5eb2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion modules/relay/src/main/RelayRound.scala
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ object RelayRound:
def viewUrl = s"https://view.livechesscloud.com/#$id/$round"
def formUrl = s"$viewUrl $round"
object UpstreamLcc:
private val idRegex = """.*view\.livechesscloud\.com/?#?([0-9a-f\-]+)""".r
private val idRegex = """view\.livechesscloud\.com/?#?([0-9a-f\-]+)""".r.unanchored
def findId(url: String): Option[String] = url match
case idRegex(id) => id.some
case _ => none
Expand Down

0 comments on commit 1cb5eb2

Please sign in to comment.