Texmaker and TeXstudio ⇒ TeXmaker. Regular expression. Question.
-
- Posts: 3
- Joined: Sun Dec 15, 2019 1:24 pm
TeXmaker. Regular expression. Question.
Hello!
I am new to TeXmaker and I have a question.
I try to substitute the '\' character in front of '%' in '1%' (example). To do this, I type the search string -- (\d+)(%) and then the replacement string -- '\1\\\2' or '\$1\$2'. And I can’t make this sign. The program perceives all service and printed characters as printed. Instead '1\%' I get '\1\\\2' or '\$1\$2'.
How to set the replacement command in the replace string correctly?
But TeXStudio do all ok.
Sorry for my english.
Thanks,
German.
I am new to TeXmaker and I have a question.
I try to substitute the '\' character in front of '%' in '1%' (example). To do this, I type the search string -- (\d+)(%) and then the replacement string -- '\1\\\2' or '\$1\$2'. And I can’t make this sign. The program perceives all service and printed characters as printed. Instead '1\%' I get '\1\\\2' or '\$1\$2'.
How to set the replacement command in the replace string correctly?
But TeXStudio do all ok.
Sorry for my english.
Thanks,
German.
NEW: TikZ book now 40% off at Amazon.com for a short time.
-
- Posts: 3
- Joined: Sun Dec 15, 2019 1:24 pm
TeXmaker. Regular expression. Question.
I found it. Solution.
Find: (\d+)%
Replace: $1\%
Very strange. Killed the TeXmaker.
Find: (\d+)%
Replace: $1\%
Very strange. Killed the TeXmaker.
- Stefan Kottwitz
- Site Admin
- Posts: 10319
- Joined: Mon Mar 10, 2008 9:44 pm
TeXmaker. Regular expression. Question.
Hi German,
welcome to the forum!
Thank you for letting us know the solution. I am German too but I don't use Texmaker. But I use regular expressions often. Nowadays LaTeX supports it.
Stefan
welcome to the forum!
Thank you for letting us know the solution. I am German too but I don't use Texmaker. But I use regular expressions often. Nowadays LaTeX supports it.
Stefan
LaTeX.org admin
-
- Posts: 3
- Joined: Sun Dec 15, 2019 1:24 pm
TeXmaker. Regular expression. Question.
Hi, Stefan
Very thanks. I found TexStudio and in it's ok with regex.
German
Very thanks. I found TexStudio and in it's ok with regex.
German
TeXmaker. Regular expression. Question.
Hi Stefan,Stefan Kottwitz wrote: But I use regular expressions often. Nowadays LaTeX supports it.
Can you elaborate what you mean by that? I am under the impression that regex is a function provided by editors/programs/etc. I do not understand "LaTeX supports it".
OS: Debian/GNU Linux; LaTeX System : TeXLive; Editor : Vim
- Stefan Kottwitz
- Site Admin
- Posts: 10319
- Joined: Mon Mar 10, 2008 9:44 pm
TeXmaker. Regular expression. Question.
There's the l3regex package.
From the package description:
Stefan
From the package description:
Also I use regular expressions a lot on the shell, with perl, and with sed (the stream editor) and other editors (such as Textmate on my Mac). So I like the fact that regular expressions can be used right within LaTeX, since I use LaTeX also for text processing, but more creating (huge configuration files for network devices) and less parsing - but parsing log files with regexps and generating reports would be another good use case.The package provides regular expression testing, extraction of submatches, splitting, and replacement, all acting on token lists. The syntax of regular expressions is mostly a subset of the PCRE syntax (and is very close to Posix), with some additions arising from the fact that TeX manipulates tokens rather than characters.
Stefan
LaTeX.org admin
TeXmaker. Regular expression. Question.
Thanks 
I tried texdoc l3regex and it came up empty. No documentation seems to be bundled with TeXLive. CTAN page also was not helpful (for me). Where can I find info about how to use this package?

I tried texdoc l3regex and it came up empty. No documentation seems to be bundled with TeXLive. CTAN page also was not helpful (for me). Where can I find info about how to use this package?
OS: Debian/GNU Linux; LaTeX System : TeXLive; Editor : Vim
- Ijon Tichy
- Posts: 640
- Joined: Mon Dec 24, 2018 10:12 am
TeXmaker. Regular expression. Question.
From the l3regex catalogue entry:
Like all parts of the LaTeX3 l3kernel bundle it is documented in the LaTeX3 interface guide interface3.pdf (currently part XXVII). But before you try to use a LaTeX3 kernel package, you should also read the LaTeX3 programming language guide expl3.pdf. The LaTeX3 style guide l3styleguide.pdf could also be useful, if you want to distribute the your programming result. Clicking to the link in the quoted sentence above should have lead you to all the linked guides too.The package is currently distributed as part of the LaTeX3 l3kernel bundle.
Sorry, but I can no longer participate here as the administrator is trampling on my wishes on one of his other platforms. 
