Security

Can you help me with to identify a hyperlink from a database?

ashok968
Loves-to-Learn

Hi,

I am getting around 1000 charters of text message from database for each record contains hyperlink present in some where.

  1. How to identify that hyperlink ?
  2. How to highlight that hyperlink ?

thanks in advance

Tags (1)
0 Karma

ashok968
Loves-to-Learn

Hi ,

Thanks for responding i have tried above but i was not able to get the result.

My search result is resulting the below text in one filed.Now i want to high late the http link and if i click on that respective page should open.

*Net banking is not working properly https:\xxyz.com*

Thanks in advance,Hi ,

Thanks for responding i have tried above but i was not able to get the result.

My search result is resulting the below text in one filed.Now i want to high late the http link and if i click on that respective page should open.

*Net banking is not working properly https:\xxyz.com*

Thanks in advance

0 Karma

MousumiChowdhur
Contributor

Hi @ashok968 ,

You can try the below regular expression to identify and extract your hyperlink from the events.

index=<your index> | rex "(?P<hyperlink>(https|http).*\/\w+[^\s]+)" max_match=0

Well, to highlight you can use the below command at the end of the above search string shown as below:

index=<your index> | rex "(?P<hyperlink>(https|http).*\/\w+[^\s]+)" max_match=0 | highlight "http","https"

Though the highlight command doesn't support regular expressions or wildcards or anything, so that will be difficult to highlight the complete hyperlink. If the number of possible hyperlinks is limited, you could create a macro that contains a highlight command with all possible message strings behind it.

Thank You!

0 Karma

ashok968
Loves-to-Learn

Hi ,

Thanks for responding i have tried above but i was not able to get the result.

My search result is resulting the below text in one filed.Now i want to high late the http link and if i click on that respective page should open.

*Net banking is not working properly https:\xxyz.com*

Thanks in advance

0 Karma
Get Updates on the Splunk Community!

What's New in Splunk Cloud Platform 9.3.2411?

Hey Splunky People! We are excited to share the latest updates in Splunk Cloud Platform 9.3.2411. This release ...

Buttercup Games: Further Dashboarding Techniques (Part 6)

This series of blogs assumes you have already completed the Splunk Enterprise Search Tutorial as it uses the ...

Technical Workshop Series: Splunk Data Management and SPL2 | Register here!

Hey, Splunk Community! Ready to take your data management skills to the next level? Join us for a 3-part ...