Im very new to Regex . Right now im trynig to use regex to prepare my markup string before sending it to the database.
Here is an example string:
@[admin](user:3) Testing this string @[hellotessginal](user:4) Hey!
So far i am able to identify @[admin](user:3) the entire term here using /@\[(.*?)]\((.*?):(\d+)\)/g
But the next step forward is that i wish to remove the (user:3) leaving me with @[admin].
Hence the result of passing through the stripper function would be:
@[admin] Testing this string @[hellotessginal] Hey!
Please help!