I need to output the below text but since \ is a special character, I cannot:
[RegularExpression(@"\d+")]
Also sometimes I need use dollar sign $ as well but it seems to be a special char, too.
What is the way to escape those in LaTeX?
UPDATE:
I used \verb as suggested but I am unable to run commands inside it. Also, in the output the font and the opacity of the text is different than the default one:
\verb|[RegularExpression(\newline @"\d+")]|
