CGI/Perl Guide | Learning Center | Forums | Advertise | Login
Site Search: in

  Main Index MAIN
INDEX
Search Posts SEARCH
POSTS
Who's Online WHO'S
ONLINE
Log in LOG
IN

Home: Perl Programming Help: Regular Expressions:
Need help replacing a phrase!

 



nexus024
New User

May 8, 2007, 5:32 PM

Post #1 of 2 (2299 views)
Need help replacing a phrase! Can't Post

I want to alter a certain phrase within the payload of a packet and in order to do this need the correct regular expression. What I am trying to replace is "protocol\68" with "protocol\-1" (without the quotes). Does anyone know how to create a regular expression to accomplish this?


osmodius
Novice

May 12, 2007, 5:19 AM

Post #2 of 2 (2288 views)
Re: [nexus024] Need help replacing a phrase! [In reply to] Can't Post


In Reply To
I want to alter a certain phrase within the payload of a packet and in order to do this need the correct regular expression. What I am trying to replace is "protocol\68" with "protocol\-1" (without the quotes). Does anyone know how to create a regular expression to accomplish this?



Code
$mystring =~ s/protocol\\-1/protocol\\68/



Need some real-time help? Shove admin@ub3r.net on yer MSN.

 
 


Search for (options) Powered by Gossamer Forum v.1.2.0

Web Applications & Managed Hosting Powered by Gossamer Threads
Visit our Mailing List Archives