Skip to content

Commit

Permalink
Improve mentions regex
Browse files Browse the repository at this point in the history
  • Loading branch information
rubengees committed Apr 27, 2018
1 parent 798c437 commit 3915ada
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/main/kotlin/me/proxer/app/util/Utils.kt
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@ import me.proxer.library.api.ProxerException.ErrorType
import okhttp3.HttpUrl
import org.jetbrains.anko.getStackTraceString
import org.threeten.bp.format.DateTimeFormatter
import java.util.regex.Pattern

/**
* @author Ruben Gees
Expand All @@ -36,7 +35,7 @@ object Utils {
val dateTimeFormatter: DateTimeFormatter = DateTimeFormatter.ofPattern("HH:mm:ss dd.MM.yyyy")

private val WEB_REGEX = Patterns.WEB_URL
private val MENTIONS_REGEX = Pattern.compile("(@[a-zA-Z0-9_\\-.]+)")
private val MENTIONS_REGEX = Regex("@.*?\\W").toPattern()

fun findActivity(currentContext: Context): Activity? = when (currentContext) {
is Activity -> currentContext
Expand Down

0 comments on commit 3915ada

Please sign in to comment.