Hi I have following string pattern:
*A
*BA*
AB
*GN*BN
I need to find such pattern in my input string.
If it matches, I need to replace the values accordingly.
How can I do it with regex?
Here pattern that I shown above is coming from XML file. So it is dynamic.
* here means wild card character. so,
*A means string ending with A.
*BA* means string containg BA in between.
AB means exact AB string.
It looks like the patterns you’re getting are pretty close to regexes already, just missing a
.in front of the*to indicate that what can be repeated is ‘anything’ (Repetition in regexes).