in reply to returning variable from within regex
the X is removed earlier in the program as it never occurs in the larger sequence therefore when i search the pattern is never found.Original pattern: TMTMTMTMTETVTITITITX
However... the character which X represents (which is any alphabetical character) must be found from the larger pattern.hence the a-z then i search through the larger string untill the pattern is foundmodified pattern:TMTMTMTMTETVTITITIT
and ideally remove the completed pattern which matched the regex so $var4 would equal TMTMTMTMTETVTITITITM or TMTMTMTMTETVTITITITQ apologies for being verbose.target pattern: TMTMTMTMTETVTITITIT[M]or[Q] etc
|
|---|