RegExp

Hi,

Can someone enlighten my mind on how to use Regexp?please i want to know how to use this.
Thank you.

The first few hits on google offer plenty of info:

Do you have any specific questions?

If you are specifically referring to the RegExp() function that JavaScript offers to run regular expressions you need not have to learn anything new as all it is for us as developers is a shortcut to creating expressions that can contain dynamically generated expressions, see the below examples for a normal expression using // and and another using the RegExp() function.

var myString = 'Does this string contain Chris?';
alert(myString.match(/Chris/i));
var myString = 'Does this string contain Chris?',
    search   = prompt('Please enter a name to search for', '');

if (match) {
    alert(myString.match(new RegExp(search), 'i'));
}

Hi, thank you for this example,is the RegExp can be use to search a word in database?because i am making program like search box using HttpRequest and in my query in database i use WHERE name like “%searchword%”.and i want to change this to use the RegExp…is this possible?Thank you in advance and i am hoping for your positive response