Is there any way to rename attribute from Proper Case to Underscore with BulkAttributeRenamer?
Here is a few examples
OrgNameComment -> Org_Name_Comment
TaxRegNumber -> Tax_Reg_Number
Ideas?
Thanks
Yarko
Is there any way to rename attribute from Proper Case to Underscore with BulkAttributeRenamer?
Here is a few examples
OrgNameComment -> Org_Name_Comment
TaxRegNumber -> Tax_Reg_Number
Ideas?
Thanks
Yarko
Best answer by ebygomm
You can access the matched string using \1 in the BulkAttributeRenamer, so if you match all words starting with a capital except the first one and then replace these with an underscore and themselves you should get what you are after
(?<!^)([A-Z]+[a-z]+)
If there are any numbers or other characters in your attribute names the regex will need amending
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.