[Date Prev][Date Next][Thread Prev][Thread Next] [Search] [Date Index] [Thread Index]

[MacPerl] regular expressions



I'm having difficulty with regular expressions, and I lent my only perl
book to a friend, so while I'm struggling away, I wondered if any regexp
guru's might help.

I have a string that looks something like this:

question1=What+is+your+name%3F&question2=How+old+are+you%3F&question3=Gender%3F&
question4=&question5=&question6=&question7=&

I want to find the first occurance of a = followed by a & (=&), backtrack
to the previous &, and remove everything after and including that &.

I know this is easy because I can picture the page in my book which
explains it, but alas I don't have the book.

In the meantime, I'll keep trying,

jake



# ===== Want to unsubscribe from this list?
# ===== Send mail with body "unsubscribe" to macperl-request@macperl.org