in reply to Re: How to cater a self defined escape char in regex ?
in thread How to cater a self defined escape char in regex ?

Thanks Loops, this is really a rephrased snip story, which I think to post the whole story only even making what I want to ask become more ambiguous. However, this is a good lesson learned for how to ask more properly.

If there's a second go, I'd ask my question in this way.

$str = '#{XX(' . $unknownString . ')}#';

Then how do I write an regex to get $1 eq $unknownString from $str? Provided the $str was actually reading from a random text file, so I cannot pre-modify it before I run the regex.