1

I have a text :

 the_historical_date := (the_study_fwd_queue_pkg_var->>'c_historical_date')::TIMESTAMP;

 udy_fwd_queue_pkg_var->>'c_testdate')
 udy_fwd_queue_pkg_var->>'C_sdad')
 udy_fwd_queue_pkg_var->>'C_sDad')
 udy_fwd_queue_pkg_var->>'C_AAA')

and a regex to find and convert upper case to lower case

Regex : '[c|C]_[a-z][^)\s]*'

Replace: \U$1

But when I click 'Replace All' or 'Replace', it's replace by an empty string

 the_historical_date := (the_study_fwd_queue_pkg_var->>)::TIMESTAMP;

 udy_fwd_queue_pkg_var->>)
 udy_fwd_queue_pkg_var->>)
 udy_fwd_queue_pkg_var->>)
 udy_fwd_queue_pkg_var->>'C_AAA')

enter image description here

What's wrong with my procedure?

ΦXocę 웃 Пepeúpa ツ
  • 47,427
  • 17
  • 69
  • 97
Ryo
  • 995
  • 2
  • 25
  • 41
  • 1
    You have no capturing group in the pattern, `$1` is an empty string. What is the expected result? If you need to replace with the match itself, you may use `\U$0` or there are other options, see linked thread. – Wiktor Stribiżew Jun 18 '20 at 09:59
  • 1
    Replace with the full match `\U$&` You can shorten the pattern to `[cC]_[a-z][^)\s]*` – The fourth bird Jun 18 '20 at 10:01
  • Thanks to @WiktorStribiżew and The fourth bird both your answers worked fine! – Ryo Jun 18 '20 at 10:07

0 Answers0