Splunk Enterprise

how to search page with hashtag?

tonicassis
New Member

can someone tell me how to include a hashtag in the query?

thanks

Tags (1)
0 Karma

scruse
Path Finder

you should also be able to just escape it \#hashbrown

piebob
Motivator

if you mean how to write a search that looks for a # in the string--you can use quotes around the string you're searching for.

0 Karma

tonicassis
New Member

thank you for your reply. I'm trying to search for a page with a hashtag at the end like "page.htm#a" but it's not working for me.

0 Karma

jspears
Communicator

Try updating your question with what the log line looks like, what part you want to find, and the search string you're using.

tonicassis
New Member

index=myindex "/mypage.asp#a"

I've also tried it without quotes: index=myindex /mypage.asp#a

0 Karma

scruse
Path Finder

try escaping the # with a \

tonicassis
New Member

like this?

index=myindex /mypage.asp\#a
0 Karma

scruse
Path Finder

yes
(extraneous characters to hit the character limit)

0 Karma

scruse
Path Finder

Additionally, # isn't really parsed as a special character in splunk splunk, and as such you should be able to search it as a free form string. if that doesn't work, either escaping it with the \ of enclosing it in single quotes should work.

0 Karma

tonicassis
New Member

can you show an example?

also, why doesn't this work: mypage.htm*

0 Karma
.conf21 Now Fully Virtual!
Register for FREE Today!

We've made .conf21 totally virtual and totally FREE! Our completely online experience will run from 10/19 through 10/20 with some additional events, too!