I would like to build a RegEx expression to replace the prefix and postfix of a string. the general string is built from
- a known prefix string
- some letter a-z or A-Z
- some unknown string with letters, hyphens, backslash, slash and numbers.
- a hyphen
- an integer number
- the symbols #.
- some string of letters
Examples:
KnownStringr/df-2e\d-3724#.Gkjsu
KnownStringEd\e4v-bn-824#.YKfg
KnownStringa-YK224E\yy-379924#.awws
I would like to replace the prefix and postfix of the NUMBER so that I get:
MyPrefix3724MyPostfix
MyPrefix824MyPostfix
MyPrefix379924MyPostfix
Aucun commentaire:
Enregistrer un commentaire