menu
Tool Player
search
Home
>
Tools
>
Replace with regex
Replace with regex
Replaces specified text in a given string using a regular expression.
See examples.
Examples
1.
Defining the regular expression
Input
Twas the night before Xmas...
29
Parameters
keyboard_arrow_down
Regular expression pattern
4
Regular expression flags
0
Replacement
9
Output
0
Reset
2.
Using global and ignore flags
Input
Apples are round, and apples are juicy.
39
Parameters
keyboard_arrow_down
Regular expression pattern
6
Regular expression flags
2
Replacement
7
Output
0
Reset
3.
Switching words in a string
Input
John Smith
10
Parameters
keyboard_arrow_down
Regular expression pattern
12
Regular expression flags
0
Replacement
6
Output
0
Reset
Examples end here.
Hide examples.
Input
content_copy
undo
redo
fullscreen
Output
refresh
content_copy
fullscreen
You may run this tool on an array of strings. Enter one string per line in the input box.
Parameters
keyboard_arrow_down
Regular expression pattern
0
Regular expression flags
1
Replacement
0
See also
Replace text