Question
Example of using regular expressions for syntax checking in javascript

Answers

var re = new RegExp("^(&[A-Za-z_0-9]{1,}=[A-Za-z_0-9]{1,})*$");
var text = myWidget.value;
var OK = re.test(text);
if( ! OK ) {
alert("The extra parameters need some work.
Should be something like: "&a=1&c=4"");
}   Your Comment




More Software Questions..
What is the inputsplit in map reduce software?

What is software configuration management?

What Is Java Api For Xml-based Rpc (jax-rpc)?

How can you implement fine-grained auditing?

What is IBM’s simple explanation for Big Data’s four critical features?

What is static synchronized method in JDBC API? Give an example?

What does the NULLIF function do?

What happens if a start method is not invoked and the run method is directly invoked?

Should we override finalize method

what is the difference between mysql_fetch_array and mysql_fetch_object?

How will XML affect my document links?

Why to use Style Sheets?

What are Filters in MVC?

Can you explain Application layer in OSI model?

How to define new testplan attributes?

What are the minimum system requirements to run Photoshop? Is it possible to run Photoshop over linux?

Which oracle package is used to manage the oracle lock management services?

What is Latch Up? Explain Latch Up with cross section of a CMOS Inverter. How do you avoid Latch Up?

What is marker interface?

What types of partitioning are there for BW?



Search
Can you Answer!!
  • Q 20-year old criminology undergraduate Marisol Valles Garcia became police chief of drug-war-torn town Praxedis Guadalupe Guerrero in what country?
  • Q What is the name of the tallest flower in the world?
  • Q What is the usage of interactive fill tool?
  • Q Rs 10,000 currency notes were introduced in 1938. They were demonetized in year?
  • Q Step in the information search in the buying process, the milder search state is classified as
  • Q The Head quarters of Inter National Labour Organisation?
  • Q What does a hagiographer write about?
  • Q Which is the only US state located in Oceania :
  • Q How to delete cookies with JSP
  • Q What is test runner ?
  • Q Will the facility manager be required to pay a single add-on charge for a CMRS tenant, even if the CMRS tenant has multiple transmitters/boxes in the building and not just one transmitter at the facility?”