Beefy Boxes and Bandwidth Generously Provided by pair Networks
laziness, impatience, and hubris
 
PerlMonks  

Re: returning variable from within regex

by pdotcdot (Acolyte)
on Aug 29, 2003 at 19:46 UTC ( [id://287817]=note: print w/replies, xml ) Need Help??


in reply to returning variable from within regex

example data:
Original pattern: TMTMTMTMTETVTITITITX
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.
modified pattern:TMTMTMTMTETVTITITIT
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 found
target pattern: TMTMTMTMTETVTITITIT[M]or[Q] etc
and ideally remove the completed pattern which matched the regex so $var4 would equal TMTMTMTMTETVTITITITM or TMTMTMTMTETVTITITITQ apologies for being verbose.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://287817]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others sharing their wisdom with the Monastery: (3)
As of 2024-04-17 03:11 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found