From d8f8829566fea9746228fe7cdec2216dbc132370 Mon Sep 17 00:00:00 2001 From: Ryan Hammett Date: Mon, 1 Feb 2016 16:21:02 -0500 Subject: [PATCH] New regex code --- slack-pixiv/commands/pixiv.rb | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/slack-pixiv/commands/pixiv.rb b/slack-pixiv/commands/pixiv.rb index e8f5f5c..4ded290 100644 --- a/slack-pixiv/commands/pixiv.rb +++ b/slack-pixiv/commands/pixiv.rb @@ -13,8 +13,9 @@ module SlackMathbot # Create iOS Illustration URL, regex pixiv_url to # extract numbers only, such as /^[0-9]+$/ - ios_url = "pixiv://illusts/" + pixiv_url.split("illust_id=")[-1] - puts ios_url + #ios_url = "pixiv://illusts/" + pixiv_url.split("illust_id=")[-1] + ios_url = "pixiv://illusts/" + pixiv_url[/\d+/] + puts ios_url # TODO: Create iOS Member URL, must find correct URL scheme