I am trying to write a regex for my HTML input which will strict the user with some conditions. (Usually I am writing codes to break up the string - so i only know the basics of regex and couldn't achieve that)
EXAMPLE:
A good input will look like this -
/account/{AccountID}/details While a bad input will be like one of those -
/account{/{AccountID}/details nor
/account/{{AccountID/details In words :
after '/' :
Accept a camelCase string
OR
Accept '{' With Pascal String (only letters) after it and must close with '}'
AND
'{' can only be after '/'
AND
after '}' :
only '/' will be acceptable
OR
String end.
If this looks to complicated to achieve by regex, I will write it as a code.
Thanks for the helpers!