I have the following jdbc url:
jdbc:mysql:${env.ABC_MY_URL}/my_schema${env.DEF_MY_SUFFIX:}?characterEncoding=UTF-8
I need two regexp that match (something)MY_URL and (something)MY_SUFFIX, because i need to replace them with others value.
What i wrote now is this:
/(\..*?_URL)/g
This correctly match (something)MY_URL (i tried to include the fullstop at first) but if i try to replace it with this:
/(\..*?_SUFFIX)/g
This match the entire string from the first fullstop untill MY_SUFFIX
I just need to extract (something)MY_URL and (something)MY_SUFFIX, because need to replace them with other values.
The value ABC and DEF could change, for this reason i would like to match (something)_MY_URL and (something)_MY_SUFFIX
I'm totally unexpert of regexpr :(