Re: IPTables and RegEx

2006-05-13 Thread Sumo Wrestler (or just ate too much)
Richard Bagshaw wrote: Peeps, Hi Richard. I'm very new to perl and I have been trying to solve a problem for a few days now, I am reading a file that I use to setup my firewall rules on a Linux box, the file contains many lines, but as an example I will show just two here :- iptables -A

Re: Regular expression for latin1 letters?

2006-05-13 Thread Dr.Ruud
Erik schreef: > iconv converts 'å' into "Ã¥". Then code2html reconizes à but not ¥ as > a letter, so the output of "Aål" is: > AÃ¥l OK, that's a bug of code2html. Also, the produced html doesn't signal that it is in UTF-8. > Since Ada code is in latin1, I suppose an input layer is needed. Yes,

Re: IPTables and RegEx

2006-05-13 Thread D. Bolliger
D. Bolliger am Sonntag, 14. Mai 2006 00.34: > Richard Bagshaw am Samstag, 13. Mai 2006 23.11: > > Hi, > > > > Thanks for the points, you are totally right though, I had thought about > > the order being different in the lines, im still pretty green when it > > comes to regular expressions, not yet

Re: IPTables and RegEx

2006-05-13 Thread D. Bolliger
John W. Krahn am Sonntag, 14. Mai 2006 01.03: > D. Bolliger wrote: > > John W. Krahn am Sonntag, 14. Mai 2006 00.11: > >>Or you could "cheat" and let Getopt::Long parse it for you: > >> > >>$ perl -MGetopt::Long -MData::Dumper -e' > >>$_ = q[iptables -A INPUT -p tcp -s 123.45.678.90 --dport 22 -j A

Re: IPTables and RegEx

2006-05-13 Thread John W. Krahn
D. Bolliger wrote: > John W. Krahn am Sonntag, 14. Mai 2006 00.11: >> >>Or you could "cheat" and let Getopt::Long parse it for you: >> >>$ perl -MGetopt::Long -MData::Dumper -e' >>$_ = q[iptables -A INPUT -p tcp -s 123.45.678.90 --dport 22 -j ACCEPT]; >>my %h; >>{ local @ARGV = split; >>GetOp

Re: IPTables and RegEx

2006-05-13 Thread D. Bolliger
John W. Krahn am Sonntag, 14. Mai 2006 00.11: > Richard Bagshaw wrote: > > I'm very new to perl and I have been trying to solve a problem for a few > > days now, I am reading a file that I use to setup my firewall rules on a > > Linux box, the file contains many lines, but as an example I will show

Re: IPTables and RegEx

2006-05-13 Thread D. Bolliger
Richard Bagshaw am Samstag, 13. Mai 2006 23.11: > Hi, > > Thanks for the points, you are totally right though, I had thought about > the order being different in the lines, im still pretty green when it > comes to regular expressions, not yet figured out a way to get around > the differences in ord

Re: IPTables and RegEx

2006-05-13 Thread John W. Krahn
Richard Bagshaw wrote: > > I'm very new to perl and I have been trying to solve a problem for a few > days now, I am reading a file that I use to setup my firewall rules on a > Linux box, the file contains many lines, but as an example I will show > just two here :- > > iptables -A INPUT -p tcp -

Re: IPTables and RegEx

2006-05-13 Thread Richard Bagshaw
Hi, Thanks for the points, you are totally right though, I had thought about the order being different in the lines, im still pretty green when it comes to regular expressions, not yet figured out a way to get around the differences in order, but I will RTFM :-) Thanks for the feedback :-)

Re: IPTables and RegEx

2006-05-13 Thread D. Bolliger
Richard Bagshaw am Samstag, 13. Mai 2006 15.56: > Peeps, > > I'm very new to perl and I have been trying to solve a problem for a few > days now, I am reading a file that I use to setup my firewall rules on a > Linux box, the file contains many lines, but as an example I will show > just two here :

Re: Regular expression for latin1 letters?

2006-05-13 Thread Erik
Dr.Ruud wrote: Erik schreef: This is perl, v5.8.7 built for i686-linux (Gentoo). It seems like it is not the file code2html itself it complains about. I can also colorize the file itself. It is when I try it with "use encoding 'latin1';" on the Ada file that it fails. If I change the letter

Re: Regular expression for latin1 letters?

2006-05-13 Thread Dr.Ruud
Erik schreef: > This is perl, v5.8.7 built for i686-linux (Gentoo). It seems like it > is not the file code2html itself it complains about. I can also > colorize the file itself. It is when I try it with "use encoding > 'latin1';" on the Ada file that it fails. If I change the letter 'å' > to some

Re: IPTables and RegEx

2006-05-13 Thread Doug Maxwell
On 5/13/06, Richard Bagshaw <[EMAIL PROTECTED]> wrote: I'm very new to perl and I have been trying to solve a problem for a few days now, I am reading a file that I use to setup my firewall rules on a Linux box, the file contains many lines, but as an example I will show just two here :- iptable

Re: Regular expression for latin1 letters?

2006-05-13 Thread Erik
Dr.Ruud wrote: Erik schreef: Dr.Ruud: Erik: Right. That code2html is full of those superfluous capture groups, so I guess there is no real need to use (?:...). I think it would be a good idea to fix them at least for the places that I modify. If you dont want to allow "

IPTables and RegEx

2006-05-13 Thread Richard Bagshaw
Peeps, I'm very new to perl and I have been trying to solve a problem for a few days now, I am reading a file that I use to setup my firewall rules on a Linux box, the file contains many lines, but as an example I will show just two here :- iptables -A INPUT -p tcp -s 123.45.678.90 --dport 2

Re: Regular expression for latin1 letters?

2006-05-13 Thread Dr.Ruud
Erik schreef: > Dr.Ruud: >> Erik: >>> I need to recognize latin1 letters in a regexp. How is it done? The >>> reason is that I want to fix a program called code2html, which is >>> written in Perl. I have the following regular expression for Ada >>> identifiers: >>> \\b[a-zA-Z](_?[a-zA-Z0-9])*\\b >

Re: object-oriented perl mailing list

2006-05-13 Thread Chad Perrin
On Sat, May 13, 2006 at 05:34:32AM -0700, Randal L. Schwartz wrote: > > Some of us got very tired of the tongue-twister title from the previous > edition, so we optimized the title. Finally. Thankfully. I don't blame you, though tongue-twisters seem to fit well (conceptually and euphemistically

Re: object-oriented perl mailing list

2006-05-13 Thread Randal L. Schwartz
> ""Ryan" == "Ryan Frantz" <[EMAIL PROTECTED]> writes: >> . . . and Tom Phoenix. Also, it has sorta been replaced in newer >> editions by a book called "Intermediate Perl", which is reportedly >> pretty much just a new edition of the same book -- though I haven't >> looked through it to doubl

Re: Regular expression for latin1 letters?

2006-05-13 Thread Erik
Dr.Ruud wrote: Erik schreef: I need to recognize latin1 letters in a regexp. How is it done? The reason is that I want to fix a program called code2html, which is written in Perl. I have the following regular expression for Ada identifiers: \\b[a-zA-Z](_?[a-zA-Z0-9])*\\b but this is wrong

Re: Regular expression for latin1 letters?

2006-05-13 Thread Dr.Ruud
"Dr.Ruud" schreef: > If an ending "_" is no problem, you can make it > > /\b[[:alpha:]]\w*/ And you can write [[:alpha:]] as [^\W\d_]. /\b[^\W\d_]\w*/ (all assuming "use encode 'latin1'") -- Affijn, Ruud "Gewoon is een tijger." -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additi

Re: Regular expression for latin1 letters?

2006-05-13 Thread Dr.Ruud
Erik schreef: > I need to recognize latin1 letters in a regexp. How is it done? The > reason is that I want to fix a program called code2html, which is > written in Perl. I have the following regular expression for Ada > identifiers: > \\b[a-zA-Z](_?[a-zA-Z0-9])*\\b > > but this is wrong because A

Regular expression for latin1 letters?

2006-05-13 Thread Erik
I need to recognize latin1 letters in a regexp. How is it done? The reason is that I want to fix a program called code2html, which is written in Perl. I have the following regular expression for Ada identifiers: \\b[a-zA-Z](_?[a-zA-Z0-9])*\\b but this is wrong because Ada identifiers include a