diff options
Diffstat (limited to 'app/src/main/kotlin/com/pitchedapps/frost/facebook/FbRegex.kt')
-rw-r--r-- | app/src/main/kotlin/com/pitchedapps/frost/facebook/FbRegex.kt | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/app/src/main/kotlin/com/pitchedapps/frost/facebook/FbRegex.kt b/app/src/main/kotlin/com/pitchedapps/frost/facebook/FbRegex.kt new file mode 100644 index 00000000..39e8c467 --- /dev/null +++ b/app/src/main/kotlin/com/pitchedapps/frost/facebook/FbRegex.kt @@ -0,0 +1,20 @@ +package com.pitchedapps.frost.facebook + +/** + * Created by Allan Wang on 21/12/17. + * + * Collection of regex matchers + * Input text must be properly unescaped + * + * See [StringEscapeUtils] + */ + +/** + * Matches the fb_dtsg component of a page containing it as a hidden value + */ +val FB_DTSG_MATCHER: Regex by lazy { Regex("name=\"fb_dtsg\" value=\"(.*?)\"") } + +/** + * Matches user id from cookie + */ +val FB_USER_MATCHER: Regex by lazy { Regex("c_user=([0-9]*);") }
\ No newline at end of file |