Home > database >  Regular expressions to solve
Regular expressions to solve

Time:09-30

How to how to use regular expressions to 11223344 aabb processing is 11:22:33:44: aa, bb

CodePudding user response:

 select rtrim (regexp_replace (' 11223344 aabb ', '(.. ), 1, 2 ', ':'), ':') from dual 

CodePudding user response:

 
Select rtrim (regexp_replace (' 111223344 aabb ', '(2 *) (.) \', '\ 1:'), ':') from dual

CodePudding user response:

reference 1st floor dd215130268 response:
 select rtrim (regexp_replace (' 11223344 aabb ', '(.. ), 1, 2 ', ':'), ':') from dual 


Consult, '(here.. ) 'is what mean

CodePudding user response:

reference w67995822 reply: 3/f
Quote: refer to 1st floor dd215130268 response:

 select rtrim (regexp_replace (' 11223344 aabb ', '(.. ), 1, 2 ', ':'), ':') from dual 


Consult, '(here.. ) 'what's the meaning of


You can like written \ 1, \ 2 omit,

CodePudding user response:

reference w67995822 reply: 3/f
Quote: refer to 1st floor dd215130268 response:

 select rtrim (regexp_replace (' 11223344 aabb ', '(.. ), 1, 2 ', ':'), ':') from dual 


Consult, '(here.. ) 'what's the meaning of

Any two characters

CodePudding user response:

http://blog.csdn.net/fjseryi/article/details/48542251

. Is any one character
() represents a character set

\ 1 the first set of regular expressions (to quote) after
As # 4 floor said, only one of the regular expression character set, here \ 2 there is no sense in

Detailed look at the link above

CodePudding user response:

reference w67995822 reply: 3/f
Quote: refer to 1st floor dd215130268 response:

 select rtrim (regexp_replace (' 11223344 aabb ', '(.. ), 1, 2 ', ':'), ':') from dual 


Consult, '(here.. ) 'what's the meaning of

CodePudding user response:

reference 4 floor wmxcn2000 response:
Quote: reference w67995822 reply: 3/f

Quote: refer to 1st floor dd215130268 response:

 select rtrim (regexp_replace (' 11223344 aabb ', '(.. ), 1, 2 ', ':'), ':') from dual 


Consult, '(here.. ) 'what's the meaning of


You can like written \ 1, \ 2 omit,

Yes, here \ 2 is useless, and this limitation is bigger, can match the number of fixed format string

CodePudding user response:

reference 5 floor chengccy reply:
Quote: refer to the third floor w67995822 response:

Quote: refer to 1st floor dd215130268 response:

 select rtrim (regexp_replace (' 11223344 aabb ', '(.. ), 1, 2 ', ':'), ':') from dual 


Consult, '(here.. ) 'what's the meaning of

Any two character

Thank you, I see!
  • Related