perl expression statement?

I’m teaching myself perl on the fly, and I can’t find any good documentation on regular expressions and delimiters that don’t involve "Hello World."

Can you help me decipher what this expression is doing?

if (/^WAIT #(\d+): nam=’([^']*)’ ela=\s*(\d+)/i)

the input is a oracle trace file, and this line is looking for lines anchored with WAIT. But I’m not following the rest of the line
is there a way to make WAIT = ?

Perl – Regular Expressions – $value =~ s/~!/ ~!/g;?

This line is from the classic formmail.cgi script:
$value =~ s/~!/ ~!/g;

It’s to stop people from using subshells. But, does anyone know what this line is actually doing and how it’s doing it?

Thanks.

Extracting data in Perl with regular expressions…?

I am trying to read all latitude and longitude values from NWS warning files like this: http://www.weather.gov/data/SGF/SVRSGF

The latitude/longitude values always appear at the bottom of the warning, between "LON" and "TIME". I had been using the regular expression: $stwarn =~ m/LON(.*)\nTIME/ but it doesn’t seem to work for all warnings.

Can anyone offer any better suggestions? Thanks!

How do I remove commas in a CSV value field with Perl regular expressions?

Record Line:

1,2,3,"four,for",5,"six,ssiixx","seven"

I want to remove the comma in "four,for" and "six,ssiixx". I tried using the $myValue =~ s/<regular_exp>/<replace_value>/g but I just end up replacing the string starting from the bad field to the last instance of a comma on the record.
Yahoo cut off my record string. Here it is again:

1,2,3,"four,for",5,"six,ssiixx","seven"
Once again, here is the full string with comma plus spacing afterwards:

1, 2, 3, "four, for", 5, "six, ssiixx", "seven"
I’m satisfied with raymanrevo’s answer but how do I choose "Best Answer"?

Here is a modified version of raymanrevo’s suggestion incorporating possible spacing:

$myValue =~ s/("[\w\ ]*),([\w\ ]*")//g;

Thank you raymanrevo! :)

Perl – Regular expressions?

I am asking about is that:
I want to save Regex rules in a file
and from the script(perl script) I want to match URL content with the rules in the file:S
Note:the file doesn’t content normal words, it content Regex rules
and i want to match the URL with each regex rule saved in the file
it’s like htaccess idea? is that possible?

legitimate work from home jobs | Event Planning Bay Area | rent video games | Homeloans | Plumbing Courses in Manchester | increase fertility | Green Drink | Photo Keyring | Vitamin D Deficiency Symptoms | skip bags | Order Fulfillment Software | virtual receptionist | Educators Credit | bodybuilding workouts | window cleaning