-
Notifications
You must be signed in to change notification settings - Fork 2
/
usefull_regexp_commands.txt
77 lines (44 loc) · 1.11 KB
/
usefull_regexp_commands.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
Useful Regexp when converting:
----------
menuchoice
----------
<span class="menuchoice">([\w\s]+)<\/span>
\{\{Menuchoice\|([\w\s]+)\}\}
to
:guilabel:`\1`
<span class="menuchoice">([\w\s]+)<\/span>
to
:menuselection:`\1`
(When using menu selections, replace --> and -> to look like -->)
---
kbd
---
<kbd>([\w\s->]+)<\/kbd>
to
:kbd:`\1`
--------------------------------
inline references(internal links
--------------------------------
\[\[([\w\s->]+)\|[\w\s->]+\]\]
to
:ref:`\1`
------------------------------------
quickly change file links to figures:
------------------------------------
\[\[File:([\w\s\.]+)\|([\w\s\.]+)\]\]
.. figure:: /images/en/\1 \n\n \2
For blending modes:
\[\[File\:([\w\s->.]+)\|thumb\|305px\|center\|([\w\s\:\.\'\*]+)]]
{\|[\w\s\d\-\;\:\=\#\"]+\n\|\[\[File\:([\w\s.-]+)\]\]\n\|\-\n\|([\w\s\:\.\*\']+)\|\}
.. figure:: /images/blending_modes/\1\n :align: center\n\n \2
------------------------------------
quickly change file links to images:
------------------------------------
\[\[File:([\d-\w\.]+)\]\]
.. image:: /images/en/\1
-----
Bold
-----
'''([\w\s]+)'''
to
**\1**