I have two type of input,
str_1 = 'rb_done_1'
str_2 = 'rb_${4}done'
I need regex to match true only one. My best try is :
reg_1 = '(^[a-zA-z0-9_]+[^{}$]$)' # returns true for 1 and false for 2, this is desired output
reg_2 = '(^[a-zA-z0-9_][\${}]+$)' # returns false for both case, should return false for 1 and true for 2
^ .. $ is used to make a full string match. in reg_2 I am trying to match one or more character from 'a-zA-z0-9_' and one or more from '${}' ( must have at least one to differentiate two type of input).