My goal is to match each portion of a endpoint path and ensure that it is in proper camelCase (for endpoints with {}, match the contents inside but excluding the brackets. The current regex I am using is as follows:
\/({?[a-z\d](?:[a-zA-Z\d])*}?)+
which is close but is matching on the segments, not the entire line (which I need). My current example dataset is the following (it should match every line but the last):
/true/{testTestId}/{test}/{x}/{y}
/v1/testTest
/v1/tests
/v1/tests/{testId}
/v1/TestTest/{testTestId}
I have tried using boundaries and anchors as I normally would but something is amiss. Any help would be incredible!
Edited: - 18 December 2019 14:10:27