Please enable JavaScript to use regex101
/
^
r
e
g
e
x
[
\
-
_
]
?
1
0
1
$
/
i
Reg
ular
Ex
pressions
101
Upgrade to Pro
Enterprise
Community Library
How to contribute
x
Match fstab for add noatime and noadirtime
Open Workspace
Python
Match
Created 2016-11-08 10:54
0
Regular Expression
r"
^
(
.
*
ext
[
2
-
4
]
|
.
*
xfs
)(
\s
+
)(
(
(
[
a
-
zA
-
Z
\=\-
]
+
)(?!
noatime,nodireatime
)
)
.
+
)
"
gm
Description
var: grub_opts: 'elevator=noop'
name: OPTIMIZ | FSTAB | Set {{ fstab_opts }} replace: dest: /etc/fstab backup: yes regexp: '^(.*ext[2-4]|.*xfs)(\s+)((([a-zA-Z=-]+)(?! {{ fstab_opts }})))(\s+)([0-9].+)' replace: '\1 \2 \3,{{ fstab_opts }} \6 \7' tags: optimization,disk,fstab
Submitted by
Anonymous