I need to validate the incoming string for text <script.
string a = "This is a simple <script> string";
Now, I need to write a regular expression that will tell me whether this string contains a <script> tag or not.
I ended up writing something like: <* ?script.* ?>
But the challenge is, Incoming string may contain script in following ways,
string a = "This is a simple <script> string";
string a = "This is a simple < script> string";
string a = "This is a simple <javascript></javascript> string";
string a = "This is a simple <script type=text/javascript> string";
Hence the regular expression should check for starting < tag and then it should check for script.