Hi Monks
I have a variable which contains perl coding.
I need to get find patter and replace patter into variabls from $text variable.$a=' $text=~s#Find \#Text#Replace Text#; $text=~s/Find \/Text/Replace Text/; $text=~s{Find \}Text}{Replace Text}; ';
if ($a=~m#$text=~s(.)\s*(?<!\1)#) { # need value $findtext='Find \#Text'; # need value $repltext='Replace Text'; }
when I ran this, It will showing an error message.
Variable length lookbehind not implemented in regex; marked by <-- HER +E in m/=~\s*s(.)(?<!\1) <-- HERE / at script.pl line 8 (#1) (F) Lookbehind is allowed only for subexpressions whose length is +fixed and known at compile time. The <-- HERE shows in the regular expressio +n about where the problem was discovered. See perlre. Uncaught exception from user code: Variable length lookbehind not implemented in regex; marked by + <-- HERE in m/=~\s*s(.)(?<!\1) <-- HERE / at script.pl line 8.
Please guide me how can i do this.
Thanks
Kanishk
In reply to Regexp help!! by kanish
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |