Re: [ACFUG Discuss] regex help

2007-06-05 Thread Dean H. Saxe
That would work if it was in the query string. He's trying to URL encode a query string as part of a larger string... not the query string he's receiving. But honestly it shouldn't be necessary, since most (all?) clients will handle that for you. -dhs Dean H. Saxe, CISSP, CEH [EMAIL

Re: [ACFUG Discuss] regex help

2007-06-05 Thread Steven Ross
I was actually just looking for a regex solution to parsing up many lines of text, some of which contain urls. And if those url's have a space on the query string to replace those spaces on the query string with the + character. I could use CF but, was trying to just get the regex. Possbly using

Re: [ACFUG Discuss] regex help

2007-06-05 Thread Dean H. Saxe
Don't need the lookarounds Use this regex and save $1 and $3 /(a.*?http://([^/]+/)+[^?]+?)([^=] +=\S+\s+\S?)/gx Then use this on $2 to replace the spaces s/\s/+/gx. Then push $1 and $2 back together to get your whole string. That's the perl way... -dhs Dean H. Saxe, CISSP, CEH [EMAIL

Re: [ACFUG Discuss] regex help

2007-06-05 Thread Dean H. Saxe
FWIW, this is an untested regex from off the top of my head... -dhs Dean H. Saxe, CISSP, CEH [EMAIL PROTECTED] [T]he people can always be brought to the bidding of the leaders. This is easy. All you have to do is to tell them they are being attacked, and denounce the pacifists for lack of

Re: [ACFUG Discuss] regex help

2007-06-05 Thread Dean H. Saxe
Good luck, the regex might need a bit of tweaking. Also, I didn't anchor it to line beginnings/endings, since I don't know the data format well enough to know if that is an issue for you. -dhs Dean H. Saxe, CISSP, CEH [EMAIL PROTECTED] Here in America everything is bought and sold, you

Re: [ACFUG Discuss] regex help

2007-06-05 Thread Shifang (Frank) Sun
:[EMAIL PROTECTED] On Behalf Of Dean H. Saxe Sent: Tuesday, June 05, 2007 1:15 PM To: discussion@acfug.org Subject: Re: [ACFUG Discuss] regex help FWIW, this is an untested regex from off the top of my head... -dhs Dean H. Saxe, CISSP, CEH [EMAIL PROTECTED] [T]he people can always be brought

Re: [ACFUG Discuss] regex help

2007-06-05 Thread Dean H. Saxe
, 2007 1:15 PM To: discussion@acfug.org Subject: Re: [ACFUG Discuss] regex help FWIW, this is an untested regex from off the top of my head... -dhs Dean H. Saxe, CISSP, CEH [EMAIL PROTECTED] [T]he people can always be brought to the bidding of the leaders. This is easy. All you have to do

RE: re[2]: [ACFUG Discuss] Regex help

2006-08-11 Thread West, Jason
To: discussion@acfug.org Subject: RE: re[2]: [ACFUG Discuss] Regex help Yes, Ben Forta did Teach Yourself Regular Expressions In 10 Minutes and I can recommend it. There are also many resources available online. Just google regular expressions and the first few that come up look quite good. There are also many

RE: re[2]: [ACFUG Discuss] Regex help

2006-08-10 Thread West, Jason
: re[2]: [ACFUG Discuss] Regex help I think what Dean is suggesting here is that it is wiser to validate both from the server and the client. The server validation being more reliable than the client. This is a well adopted paradigm and Dean helps us remember this. Also, MITM = Man

Re: re[2]: [ACFUG Discuss] Regex help

2006-08-10 Thread Steven Ross
]: [ACFUG Discuss] Regex help I think what Dean is suggesting here is that it is wiser to validate both from the server and the client. The server validation being more reliable than the client. This is a well adopted paradigm and Dean helps us remember this. Also, MITM = Man In The Middle

RE: re[2]: [ACFUG Discuss] Regex help

2006-08-10 Thread Charlie Arehart
To: discussion@acfug.org Subject: Re: re[2]: [ACFUG Discuss] Regex help Jason, First start with one of the RegEx in 10 minutes a day type books. I think there is one from Sams Publishing. If you want to be a serious geek, Regular Expressions by Jeffrey Friedl from O'Reilly rocks. -dhs Dean H. Saxe

Re: re[2]: [ACFUG Discuss] Regex help

2006-08-10 Thread Dean H. Saxe
), if someone doesn't already know of one. /charlie http://www.carehart.org/blog/ -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Dean H. Saxe Sent: Thursday, August 10, 2006 11:09 AM To: discussion@acfug.org Subject: Re: re[2]: [ACFUG Discuss] Regex help

Re: [ACFUG Discuss] Regex help

2006-08-07 Thread Dean H. Saxe
Not if his string is case-sensitive, which it appears to be. -dhs Dean H. Saxe, CISSP, CEH [EMAIL PROTECTED] [T]he people can always be brought to the bidding of the leaders. This is easy. All you have to do is to tell them they are being attacked, and denounce the pacifists for lack of

Re: [ACFUG Discuss] Regex help

2006-08-07 Thread Teddy Payne
Steven beat me to that one. I was just typing that. Also, it depends on how you implement your form as well. If you use HTML forms and non-flash form with regex validation, then you have _javascript_ that can be turned off. Now if you implement a flash form, I believe the validation stays internal

Re: re[2]: [ACFUG Discuss] Regex help

2006-08-07 Thread Dean H. Saxe
Say you want to find your string and its 10 to 12 characters in the hexadecimal character set. You can validate your data with: [A-F0-9]{10,12} This will match any hexadecimal number with a minimum of 10 chars and a maximum of 12. Its a positive way of doing data validation on your

Re: re[2]: [ACFUG Discuss] Regex help

2006-08-07 Thread Teddy Payne
I think what Dean is suggesting here is that it is wiser to validate both from the server and the client. The server validation being more reliable than the client. This is a well adopted paradigm and Dean helps us remember this. Also, MITM = Man In The Middle, which is a type of attack that can

Re: [ACFUG Discuss] regex help

2006-05-17 Thread Dean H. Saxe
Your regex is:menu[0-9]+[^;]+That gets from menu through the character preceding the semicolon.-dhs Dean H. Saxe, CEH[EMAIL PROTECTED]"To announce that there must be no criticism of the president, or that we are to stand by the president right or wrong, is not only unpatriotic and servile, but is

Re: [ACFUG Discuss] regex help

2006-05-17 Thread Teddy Payne
(\/\/)?[\s]+menu[0-9]+.addItem[^;]+This captured the complete line to include the comments and optional space in between the // to the menu.addItem method.All you need to do is make sure not to use the strings that start with //. TeddyThis will get any addItem lines. Just make sure to exclude the