(解决)如何使用“[”分裂的分裂模式Operator

capsoncapson MemberPosts:8Contributor II
edited July 2019 inHelp
I have data that comes from LimeSurey looking like: stuff [other stuff] so in my table I have a field I want to split

Example
field1
stuff [other stuff]
stuff [other stuff]
stuff [other stuff]

Trying to get
field1 field2
stuff other stuff]
stuff other stuff]
stuff other stuff]


I am using the split operator were my split pattern is the open square bracket[
The operator will not allow this as a split pattern

I have:
attribute filter type = single
attribute = field1
split pattern =[

I get Error:
The regular expression[is not well defined: Unclosed character class near index[

Is thier anyway to force the split operator to use[as a split pattern?

Thanks
Tagged:

Answers

  • Fran_ois-Paul_SFran_ois-Paul_S MemberPosts:2Contributor I
    just a guess: did you try to escape it with an anti-slash? (that is, using "\[" instead of just "[")
    [ is a metacharacter in a regex, and escaping is the standard way to use such a char in a search. I didn't try, however.
    HTH
    fps
  • capsoncapson MemberPosts:8Contributor II
    That is good to know, it worked.

    Many thanks!
Sign InorRegisterto comment.