Skip to main content

I have a field like thisHow to extract the numbers + 3 characters following it from a columnand I want to extract the following from this.

 

fanbase 1 

The unit is always "cm" so basically I need to extract the first number from the left and after the last number from the right a space and then 2 more characters.

 

Please help.

Thanks

1 answer
  1. Jun 2, 2021, 5:02 PM

    Hi @Juniper Lewis​ ,

    You can use a regular expression for this. Here's what I came up with:

    .+?([0-9]+.*?)\scm

    Feel free to test here at regex101. In tableau, you'll want to use REGEXP_EXTRACT. Example below:

    Hi @Juniper Lewis​ ,You can use a regular expression for this. Here's what I came up with:.+?([0-9]+.*?)\scmFeel free to test here at regex101. In tableau, you'll want to use REGEXP_EXTRACT. 

    Best,

    Bryce

0/9000