also I am sort of confused by this regex and I think I am confused because we have not used grep before
It probably selects only filenames which end in jpg or gif. Tip #9 from the Basic debugging checklist (YAPE::Regex::Explain)
The regular expression: (?i-msx:\.(?:gif|jpg)$) matches as follows: NODE EXPLANATION ---------------------------------------------------------------------- (?i-msx: group, but do not capture (case-insensitive) (with ^ and $ matching normally) (with . not matching \n) (matching whitespace and # normally): ---------------------------------------------------------------------- \. '.' ---------------------------------------------------------------------- (?: group, but do not capture: ---------------------------------------------------------------------- gif 'gif' ---------------------------------------------------------------------- | OR ---------------------------------------------------------------------- jpg 'jpg' ---------------------------------------------------------------------- ) end of grouping ---------------------------------------------------------------------- $ before an optional \n, and the end of the string ---------------------------------------------------------------------- ) end of grouping ----------------------------------------------------------------------
In reply to Re: CGI Help
by toolic
in thread CGI Help
by phizymonk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |