1

I would like to select the values which have no numbers in their string.

For this purpose I used the following code:

CASE WHEN 
 regexp_match("Address L1", '^\\d*\\s?')
 THEN
 NULL 
 ELSE
 "Address L1"
 END

In order to paste them in a different column. Unfortunately, it doesn't work. The same as other approaches beneath:

 CASE WHEN 
 regexp_match ("Address L1",<>( '^\\d*\\s?'))
 THEN
 NULL 
 END

 CASE WHEN 
  regexp_match <> ("Address L1",( '^\\d*\\s?'))
  THEN
  NULL 
  END

the code below

 CASE WHEN 
 "Address L1" <> regexp_match ("Address L1",( '^\\d*\\s?'))
 THEN
 "Address L1"
 END

changed everything badly

enter image description here

Is there a way of selecting just these strings, which don't have numbers?

1 Answer 1

3

You can use this expression to copy all fields having no number at all in it:

if(not regexp_match("field",'[\\d]'),"field",NULL)

Or this expression to copy all fields not starting with a number:

if(not regexp_match("field",'^([\\d])'),"field",NULL)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.