Replace Pioneer Home
All Examples
Free Download
all
Advanced search and replace
Replace text in multiple files
Regular expression replace
Batch file rename
Batch download
Text file parser
Text file splitter
Html text generator
Search replace binary
Random word generator
Count and statistics
Character encoding
Bin Hex Oct Dec converter
Text generator
Text sort
Text merge
Text data calculation
RSS: Replace Pioneer Examples
1389.Regular expression replace -- How to add parenthesis around a pair of single quote after 'like'?
User:
jiangnan -- 2017-02-14
<< 1388
1390 >>
Hits:
4022
Type:
Regular expression replace
Search all
Regular expression replace
examples
Description:
How to add a pair of parenthesis after string like and before a pair of single quote?
Input Sample:
select ccc from ttt where c1 like '%a b%' or c2 like '%d%'
Output Sample:
select ccc from ttt where c1 like ('%a b%') or c2 like ('%d%')
Answer:
Hint: You need to
Download and install "Replace Pioneer"
on windows platform to finish following steps.
1. ctrl-o open text file
2. ctrl-h open 'replace dialogue'
* set 'search for pattern' to:
like\s+(\'[^\']*\')
* set 'replace with pattern' to:
like ($1)
3. click 'replace', done.
Screenshot 1: Replace_Window
Similar Examples:
How to change each pair of single quote to parenthesis?
(58%)
How to batch rename files from file content after Title and Author?
(49%)
How to add a space in the middle of the two characters in each line?
(47%)
How to add different words at the beginning of each line?
(46%)
How to batch rename files with the first word of file contents?
(46%)
How to batch rename files with the first line of file content as new file name?
(46%)
How to remove all lines that can be found in another file?
(45%)
How to add a page number after every 40 lines in a text file?
(45%)
Check Demo of
Regular expression replace
Keywords:
round
quote
parenth
parenthesis
quot
nth
pare
bef
befor
before
replace single with a pair
set replace parenthesis
replace quote
before and after
add string with replace
add string
add 1 to string
add text before