#Random
This is a place to discuss all things outside of Splunk, its products, and its use cases.

How do you format code in a question comment?

lukejadamec
Super Champion

I'm seeing folks do it, but I don't see a format button.
If you're working in a Splunk Answers comment field, how do you format text as code?

Tags (1)
0 Karma
1 Solution

gkanapathy
Splunk Employee
Splunk Employee

You can simply indent it 4 spaces. You can also enclose it in in backquotes, or you can use the <pre></pre> tags. Help for Markdown is here: http://daringfireball.net/projects/markdown/syntax

View solution in original post

altink
Builder

 didn't work for me

gkanapathy
Splunk Employee
Splunk Employee

You can simply indent it 4 spaces. You can also enclose it in in backquotes, or you can use the <pre></pre> tags. Help for Markdown is here: http://daringfireball.net/projects/markdown/syntax

lukejadamec
Super Champion

Thanks for the document link. It is good reading, but it is not much help unless I'm looking for a new profession.

0 Karma

lukejadamec
Super Champion

Pooks then?
*%^#!&)*^!!!
mmm
Hoot!

0 Karma

lukejadamec
Super Champion

4 spaces?
%^#!)^!!!
rrr them
*%^#!)*^!!!
stars.

0 Karma

pradeepkumarg
Influencer

embed your code between pre tags < pre > < /pre >

Remove the space inside the tag when you use it.

shartwell
Explorer

Testing 123

0 Karma

shartwell
Explorer

Testing 123

0 Karma

shartwell
Explorer
Testing 123
0 Karma

cblanton
Communicator
Testing 123
 code 
0 Karma

lukejadamec
Super Champion

Thanks, it

%^#!)^

worked!
Except for the *'s, what is up with that? I still have to escape them
*%^#!)*^!!!

stars!

0 Karma

rbechtold
Communicator

test

 | rex field=raw max_match=0 "\s?(?P[A-Za-z-\]+=[^\s]+)" 

0 Karma

lukejadamec
Super Champion
index=saywhat? sourcetype=I\sneed\sto\suse\s.*&%&%\sxml?
0 Karma

govindsinghrawa
Path Finder

let me try

hello world
0 Karma

govindsinghrawa
Path Finder

Eureka!!!!

0 Karma
Get Updates on the Splunk Community!

New in Observability - Improvements to Custom Metrics SLOs, Log Observer Connect & ...

The latest enhancements to the Splunk observability portfolio deliver improved SLO management accuracy, better ...

Improve Data Pipelines Using Splunk Data Management

  Register Now   This Tech Talk will explore the pipeline management offerings Edge Processor and Ingest ...

3-2-1 Go! How Fast Can You Debug Microservices with Observability Cloud?

Register Join this Tech Talk to learn how unique features like Service Centric Views, Tag Spotlight, and ...