-1
COD(CdTypCd_'SPC_fghfh')
COD(CdTypCd_'SPC.,/'][[]\=-09&^%$#@!~*/-*-*/-/-/-*/-*+@#$$%áèÿó')
COD(CdTypCd_'SPC')
COD(CdTypCd_'SPC@#$$áèÿó%')

I need to select ' ' inside the single quotes values using regular expression

Alex K.
  • 171,639
  • 30
  • 264
  • 288
Rubber
  • 87
  • 9
  • https://regex101.com/r/nY4fA7/1 ? – Alex K. May 25 '16 at 11:07
  • Possible duplicate of [how do i do a range regex in ruby like awk /start/,/stop/](http://stackoverflow.com/questions/12980500/how-do-i-do-a-range-regex-in-ruby-like-awk-start-stop) – Rubber Jan 18 '17 at 08:21

1 Answers1

1

Since you have quotes inside single quoted string(2nd line), you will have to use greedy matching:

(?<=').*(?=')

to get text between single quotes (https://regex101.com/r/nF0bM7/2)

To get text exactly between single quotes use non greedy matching like this: https://regex101.com/r/jA6hB6/1

riteshtch
  • 8,629
  • 4
  • 25
  • 38