GeneralAdding regex inline - problem with special characters

LaTeX specific issues not fitting into one of the other forums of this category.
Post Reply
one_eddie
Posts: 13
Joined: Thu Sep 04, 2008 11:13 am

Adding regex inline - problem with special characters

Post by one_eddie »

I would like to have this regex string ^((\w|[-0-9\.])+;*(\w|[-0-9\.])*\s*)+$ included inline in my text. But there are many error messages. I tried to escape special characters but there still are some errors I don't understand.

Is there a tool which can auto escape my string so I could put is easily in my tex?

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

Learn LaTeX easily with newest books:

The LaTeX Beginner's Guide: 2nd edition and perfect for students writing a thesis

The LaTeX Cookbook: 2nd edition full of practical examples for mathematics, physics, chemistry, and more

LaTeX Graphics with TikZ: the first book about TikZ for perfect drawings in your LaTeX thesis

one_eddie
Posts: 13
Joined: Thu Sep 04, 2008 11:13 am

Re: Adding regex inline - problem with special characters

Post by one_eddie »

Finally i found there is a \verb command.
Problem solved.
Post Reply