[thelist] regex help

Tom Dell'Aringa pixelmech at yahoo.com
Tue Sep 2 21:32:17 CDT 2003


--- Frank <lists at frankmarion.com> wrote:
> At 06:11 PM 2003-09-02 -0700, you wrote:
> So if I understand you correctly, you will always need to remove
> the third set of "s#" regardless? Piece o'cake.

Ahhh ....no! Incorrect.

Think of a list of 's#' values:

s1
s2
s3
s4

They are just all run together. I need to remove ONE of the "s#"
values. In the above case it will be either s1, s2, s3 or s4. The 's'
is NEVER without a number, and vice versa. Let's say I want to remove
s3. 

So, the issue I want an regex for is to remove s3 from the string
"s1s2s3s4" to leave me "s1s2s4".

- SO - I just want a pattern that says:

"match 's' and then the supplied numerical value (a variable)"

I thought this would be it: /[s][3]/ where '3' is my variable number.
This obviously doesn't work...

Tom

=====
http://www.pixelmech.com/ :: Web Development Services
http://www.DMXzone.com/ :: Premium Content Author / JavaScript / Every Friday!
http://www.maccaws.com/ :: Group Leader
[Making A Commercial Case for Adopting Web Standards]

"That's not art, that's just annoying." -- Squidward


More information about the thelist mailing list