expression question

Any questions involving matching text strings to patterns - the pattern is called a "regular expression."

Moderator: General Moderators

Post Reply
User avatar
itsmani1
Forum Regular
Posts: 791
Joined: Mon Sep 29, 2003 2:26 am
Location: Islamabad Pakistan
Contact:

expression question

Post by itsmani1 »

here is my regex:

Code: Select all

RewriteRule ^prod/([0-9]+)/(a-z_)tic.html production.php?ContentID=$1
its working fine but i don't know what's the function of "?ContentID=$1"
can anyone tell me about this?

thank you,
User avatar
Kieran Huggins
DevNet Master
Posts: 3635
Joined: Wed Dec 06, 2006 4:14 pm
Location: Toronto, Canada
Contact:

Post by Kieran Huggins »

each match in parentheses --> () <-- will be available in the replacement string as a numbered variable, depending on the order in the match string
Post Reply