1
0
mirror of https://github.com/akaessens/NoFbEventScraper synced 2025-06-05 23:29:13 +02:00

use regex find instead of replace for url matching

This commit is contained in:
akaessens
2020-08-26 18:47:44 +02:00
parent 57b00e2e57
commit 05f3ba9a33
2 changed files with 12 additions and 5 deletions

View File

@ -74,7 +74,7 @@ public class FbScraper extends AsyncTask<Void, Void, Void> {
protected String fixLinks(String description_in) {
try {
// @[152580919265:274:MagentaMusik 360] -> m.facebook.com/152580919265
return description_in.replaceAll("@\\[([0-9]{10,}):[0-9]{3}:([^\\]]*)\\]",
return description_in.replaceAll("@\\[([0-9]{10,}):[0-9]{3}:([^]]*)]",
"$2 [m.facebook.com/$1]");
} catch (Exception e) {