aboutsummaryrefslogtreecommitdiff
path: root/app/src/main/java/ml/docilealligator/infinityforreddit
diff options
context:
space:
mode:
authorOHermesJunior <ohermesjunior@gmail.com>2020-05-11 22:46:42 +0000
committerOHermesJunior <ohermesjunior@gmail.com>2020-05-11 22:46:42 +0000
commit8ddae6164978f7fa1a262dec6b57f230b727b3f8 (patch)
treeb4d006f74677fd20a2ff9da0abcc14082847c134 /app/src/main/java/ml/docilealligator/infinityforreddit
parentccecc2b511bffc9711bd41b15aabccc2d179b9cd (diff)
downloadinfinity-for-reddit-8ddae6164978f7fa1a262dec6b57f230b727b3f8.tar
infinity-for-reddit-8ddae6164978f7fa1a262dec6b57f230b727b3f8.tar.gz
infinity-for-reddit-8ddae6164978f7fa1a262dec6b57f230b727b3f8.tar.bz2
infinity-for-reddit-8ddae6164978f7fa1a262dec6b57f230b727b3f8.tar.lz
infinity-for-reddit-8ddae6164978f7fa1a262dec6b57f230b727b3f8.tar.xz
infinity-for-reddit-8ddae6164978f7fa1a262dec6b57f230b727b3f8.tar.zst
infinity-for-reddit-8ddae6164978f7fa1a262dec6b57f230b727b3f8.zip
More little improvements for regex.
Diffstat (limited to 'app/src/main/java/ml/docilealligator/infinityforreddit')
-rw-r--r--app/src/main/java/ml/docilealligator/infinityforreddit/Activity/LinkResolverActivity.java12
1 files changed, 6 insertions, 6 deletions
diff --git a/app/src/main/java/ml/docilealligator/infinityforreddit/Activity/LinkResolverActivity.java b/app/src/main/java/ml/docilealligator/infinityforreddit/Activity/LinkResolverActivity.java
index bacb5a68..6719fe54 100644
--- a/app/src/main/java/ml/docilealligator/infinityforreddit/Activity/LinkResolverActivity.java
+++ b/app/src/main/java/ml/docilealligator/infinityforreddit/Activity/LinkResolverActivity.java
@@ -30,14 +30,14 @@ public class LinkResolverActivity extends AppCompatActivity {
public static final String EXTRA_MESSAGE_FULLNAME = "ENF";
public static final String EXTRA_NEW_ACCOUNT_NAME = "ENAN";
- private static final String POST_PATTERN = "/r/\\w+/comments/\\w+/{0,1}\\w+/{0,1}";
- private static final String COMMENT_PATTERN = "/(r|u|U|user)/\\w+/comments/\\w+/{0,1}\\w+/\\w+/{0,1}";
- private static final String SUBREDDIT_PATTERN = "/[rR]/\\w+/{0,1}";
- private static final String USER_PATTERN = "/([uU]|user)/\\w+/{0,1}";
+ private static final String POST_PATTERN = "/r/\\w+/comments/\\w+/?\\w+/?";
+ private static final String COMMENT_PATTERN = "/(r|u|U|user)/\\w+/comments/\\w+/?\\w+/\\w+/?";
+ private static final String SUBREDDIT_PATTERN = "/[rR]/\\w+/?";
+ private static final String USER_PATTERN = "/(u|U|user)/\\w+/?";
private static final String SIDEBAR_PATTERN = "/[rR]/\\w+/about/sidebar";
- private static final String MULTIREDDIT_PATTERN = "/user/\\w+/m/\\w+/{0,1}";
+ private static final String MULTIREDDIT_PATTERN = "/user/\\w+/m/\\w+/?";
private static final String MULTIREDDIT_PATTERN_2 = "/[rR]/(\\w+\\+?)+/?";
- private static final String REDD_IT_POST_PATTERN = "/\\w+/{0,1}";
+ private static final String REDD_IT_POST_PATTERN = "/\\w+/?";
@Inject
@Named("default")