[thelist] regex help

Frank lists at frankmarion.com
Tue Sep 2 22:41:15 CDT 2003


At 07:32 PM 2003-09-02 -0700, you wrote:
>- SO - I just want a pattern that says:
>
>"match 's' and then the supplied numerical value (a variable)"

Well, the two patterns I've offered will do the trick. But if you know what 
your variable is, already, why don't you simply replace it with '' <nothing>?

if you know your student number is 16, and your string is s1ss143s16s34 why 
don't you simply do

mys = s + variable
myvariable = myvariable (minus) mys?

The above represents however PHP does a replace or delete from a string. If 
you know what the variable is, seems you don't really need a regular 
expression to find a match, you *know* the exact match.

Or am I missing something? Or possibly are you not clear on the usage of a 
regex (just asking, to cover all the bases).

If this is a regex issue, I think I can help you out, if it's a PHP issue, 
I can't.



--
Frank Marion     lists at frankmarion.com      Keep the signal high.  



More information about the thelist mailing list