views:

30

answers:

2

I am trying to implement a Url Rewriting and struggling to figure out pattern matching for

SC%3aArgument1+Argument2+%26+Argument3+Argument4.

Any help is great!!

+1  A: 

I'm guessing you want argument1, 2, 3, and 4?

Does SC%3a(.*?)\+(.*?)\+%26\+(.*?)\+(.*?)\. work?

Btw, that input is URL Encoded for "SC:Argument1 Argument2 & Argument3 Argument4."

Greg
A: 

regex in VI:

SC:\([^+]*\)+\([^+]*\)+&+\([^+]*\)+\([^.]*\).

However you should adapt it for you context - C++, perl etc.

outmind
Could you provide more samples to understand which pattern are you really considering.
outmind