
spider
User

Jul 10, 2008, 1:12 AM
Post #2 of 2
(2198 views)
|
|
Re: [rahulranjith] Perl Pattern Matching !!! Help
[In reply to]
|
Can't Post
|
|
The question will be what you know of the string you are searching in. In the first case you could do someting like: if($string =~ /File(.+)Networking/){ $new_string = $1 ; } in the last case, if you know FILENAME, and you know you are searching for digits, it could be: if($VAR =~ /FILENAME\'(\d+)\)/){ print $1 ; }
|