Points of Required Attention™
Please chime in on a proposed restructuring of the ROM hacking sections.
Views: 88,498,125
Main | FAQ | Uploader | IRC chat | Radio | Memberlist | Active users | Latest posts | Calendar | Stats | Online users | Search 04-28-24 11:15 PM
Guest: Register | Login

0 users currently in Help/Suggestions/Bug Reports | 1 guest

Main - Help/Suggestions/Bug Reports - Problems with [quote] New thread | New reply


stag019
Posted on 03-18-07 02:51 AM Link | Quote | ID: 16344


Snifit
Level: 40

Posts: 31/299
EXP: 409677
Next: 31632

Since: 02-19-07

Last post: 4282 days
Last view: 2169 days
Posted by User 1"][quote="User 2
What User 1 said.
What User 2 said.


Posted by User
The post id is not a number. Might I reccomend ([0-9]+?)
Even worse, try changing either ] to ] in this post.
That's what (.*?) does though. Why not try ([^"]*?) for between the quotes (being sure to escape that double quote if need be)? Then if any name has double quotes in it, replace it with ".

Xkeeper
Posted on 03-18-07 09:00 PM Link | Quote | ID: 16626


Level: 105

Posts: 926/2846
EXP: 12030651
Next: 231609

Since: 02-19-07

Last post: 6062 days
Last view: 2799 days
I don't do regular expressions. In short, you make no sense.

Honestly, this was really just a hacked up version of the "[url]" filter... it probably isn't as good as it could be

And besides, unless there's something evil you could do via it, there's no real reason to break it.


(Although I'm pretty sure usernames with " aren't allowed anyway, maybe I should check)

____________________
I dealt with it.

stag019
Posted on 03-18-07 09:48 PM Link | Quote | ID: 16664


Snifit
Level: 40

Posts: 32/299
EXP: 409677
Next: 31632

Since: 02-19-07

Last post: 4282 days
Last view: 2169 days
Posted by "Xkeeper"
I don't do regular expressions. In short, you make no sense.
If you let me have a look at that part of the code, I could fix it up for you. Or maybe Acmlm or blackhole89 can see this thread and fix it.
Posted by "Xkeeper"
Honestly, this was really just a hacked up version of the "[url]" filter... it probably isn't as good as it could be
I kinda figured. That's how I first started getting into regexp.
Posted by "Xkeeper"
And besides, unless there's something evil you could do via it, there's no real reason to break it.
But see, I don't think I made this clear enough, but the first quote set in that post should be completely legit and working, but it isn't working. I saw this in some thread (but can't find it anymore), so I reported it.

Stifu
Posted on 03-18-07 09:52 PM Link | Quote | ID: 16669


Cobrat
Level: 56

Posts: 49/666
EXP: 1361565
Next: 36611

Since: 02-22-07

Last post: 688 days
Last view: 310 days
Posted by Xkeeper
I don't do regular expressions.

You should...

Kernal
Posted on 03-18-07 09:58 PM Link | Quote | ID: 16675

Gone
Level: 88

Posts: 789/1881
EXP: 6463485
Next: 187179

Since: 02-20-07

Last post: 6149 days
Last view: 6139 days
I always thought regular expressions were the most confusing thing in programming other than maybe assembly language. To my eyes, they look like a cross between Brainfuck and a cat walking across a keyboard.

stag019
Posted on 03-18-07 10:11 PM Link | Quote | ID: 16690


Snifit
Level: 40

Posts: 34/299
EXP: 409677
Next: 31632

Since: 02-19-07

Last post: 4282 days
Last view: 2169 days
Posted by Kernal
I always thought regular expressions were the most confusing thing in programming other than maybe assembly language. To my eyes, they look like a cross between Brainfuck and a cat walking across a keyboard.
Regular expressions are quite confusing, but after a while of seeing different kinds, it makes a bit more sense. If I ever have any problems with it, I'll ask Boom.dk, and he usually can get it, then I reread the code, which I usually then understand.

Xkeeper
Posted on 03-19-07 03:12 AM Link | Quote | ID: 16779


Level: 105

Posts: 933/2846
EXP: 12030651
Next: 231609

Since: 02-19-07

Last post: 6062 days
Last view: 2799 days
The first one isn't valid because [quote=name] doesn't use quotes; only the new ones do (for compatibility)

____________________
I dealt with it.

Stifu
Posted on 03-19-07 08:15 AM Link | Quote | ID: 16880


Cobrat
Level: 56

Posts: 50/666
EXP: 1361565
Next: 36611

Since: 02-22-07

Last post: 688 days
Last view: 310 days
I think you shouldn't bother with compatibility, and just stop supporting the version without quotes...

Kernal
Posted on 03-19-07 12:41 PM Link | Quote | ID: 16901

Gone
Level: 88

Posts: 796/1881
EXP: 6463485
Next: 187179

Since: 02-20-07

Last post: 6149 days
Last view: 6139 days
But wouldn't that break some old posts on this board?

Xkeeper
Posted on 03-19-07 06:59 PM Link | Quote | ID: 16974


Level: 105

Posts: 939/2846
EXP: 12030651
Next: 231609

Since: 02-19-07

Last post: 6062 days
Last view: 2799 days
Yes, and also old posts quoted from the older board (which I do occasionally).



____________________
I dealt with it.

Stifu
Posted on 03-19-07 07:29 PM Link | Quote | ID: 16977


Cobrat
Level: 56

Posts: 51/666
EXP: 1361565
Next: 36611

Since: 02-22-07

Last post: 688 days
Last view: 310 days
You could also support the [quote="username"] tag, while still supporting the old [quote=username] one at the same time, but only show the new version with double quotes by default, when replying to posts, PMs, or in the (upcoming ?) FAQ...

Kernal
Posted on 03-19-07 10:15 PM Link | Quote | ID: 17038

Gone
Level: 88

Posts: 811/1881
EXP: 6463485
Next: 187179

Since: 02-20-07

Last post: 6149 days
Last view: 6139 days
Is there a way to have it ignore any double quotes at the beginning or end of the provided username?

Stifu
Posted on 03-19-07 10:40 PM Link | Quote | ID: 17044


Cobrat
Level: 56

Posts: 55/666
EXP: 1361565
Next: 36611

Since: 02-22-07

Last post: 688 days
Last view: 310 days
Yeah. But it'd require more than that to fix the problem... Like usernames with ] in them, and stuff, which would also break the old quote tag.

HyperHacker
Posted on 03-25-07 01:17 AM Link | Quote | ID: 18872

...
Level: 73

Posts: 4/1220
EXP: 3367463
Next: 118405

Since: 03-25-07
From: no

Last post: 6094 days
Last view: 6077 days
Posted by Kernal
I always thought regular expressions were the most confusing thing in programming other than maybe assembly language. To my eyes, they look like a cross between Brainfuck and a cat walking across a keyboard.
Regular expressions are extremely powerful but can be extremely difficult. Most of the time I try to use one on a small data set I end up spending more time making it work correctly than it'd take to do what I'm trying to do by hand. For filtering or large data sets, though, they're invaluable.

Main - Help/Suggestions/Bug Reports - Problems with [quote] New thread | New reply

Acmlmboard 2.1+4δ (2023-01-15)
© 2005-2023 Acmlm, blackhole89, Xkeeper et al.

Page rendered in 0.026 seconds. (321KB of memory used)
MySQL - queries: 67, rows: 89/90, time: 0.016 seconds.