Was about to ask a question, then found a workarou...
# general
e
Was about to ask a question, then found a workaround so I thought I'd share it here. This may be a very specific thing, but maybe someone benefits from it in the future... REGEXP_REPLACE has a limit of 32 strings it can handle...
REGEXP_REPLACE({description}, 'someString | someString2 | someString3 | someString4 | someString5...  | someString32','')
To get around this, you can nest REGEXP_REPLACE functions:
REGEXP_REPLACE(REGEXP_REPLACE({description}, 'someString | someString2 | someString3 | someString4 | someString5...  | someString32',''), 'someString | someString2 | someString3 | someString4 | someString5...  | someString32','')
s
Post should post in #C2A1ZEMF0 as well
r
If you're going more than 32 deep... that's a REGEXP from hell...
s
I try to avoid complex searches in the first place.
e
Absolutely a REGEXP from hell lol. Company designs signs and their descriptions will be like 'Do Not Enter - 12"x12"' 'Do Not Enter - 14"x14"' 'Do Not Enter - 16"x16"'.... and I'm being tasked with creating a field on their items called "Sign Text" that should be just "Do Not Enter" so I'm using REGEXP to remove all of their sign sizes... which they have more than 32 of
I would just remove everything after ' - ' but some of their signs contain that also like... "Stop - 4 way - 16"x16"
s
sounds like they need to decouple sign text and sign size - and combine them to create the description, rather than deconstructing
unless this is a one-time conversion to try and get back to something more sane like that?
e
They started using a better format for their part numbers that indicate the size and such.... but the first 450,000 signs they didnt... they now use -12X12 as a suffix for their part numbers to indicate a 12x12 sign
r
I agree. slap those bad boys into a matrix and be done with it.
separate fields that can be quickly updated via a csv file (after split/concatenating with excel)
e
I'm nervous to go the Matrix route at this point. Since they have 5+ years of data, changing all of the inventory items to Matrix items would break all those links