-1

I'm working with Google BigTable. I would like to use the convertToRegExpString method to access at specific Row Key having partial information.

I have a row key like this: "AAAAA&BBBBB&CCCCC&DDDDD"

I should pass to the method a regex that specifies first two keys (AAAAA&BBBBB) and the last one (DDDDD), bypassing the third value. Consider that the third value has a variable length and it can be compose by characters and numbers.

Thank you in advance

PdF
  • 77
  • 1
  • 13
  • 1
    Sorry, what's the question exactly? If you're wondering how to compose this regex, I believe it would be something like AAAAA&BBBBB&[^&]+&DDDDD – Douglas McErlean Oct 31 '19 at 14:41
  • Yep you get the point! If this work i'll mark your answer as correct. – PdF Oct 31 '19 at 14:45

1 Answers1

1

The regex for this should be something like AAAAA&BBBBB&[^&]+&DDDDD

It looks for your first two fields AAAAA and BBBBB with delimiters, then at least one non-delimiter character (the [^&] is an inverted character class and the + means "at least one"), and finally a delimiter and your last field DDDDD.