Quick and dirty regex question
Posted: Wed Feb 22, 2012 4:20 am
Hi guys,
I would normally research this myself, but I am in a hurry just now.
My question is - how would I take a string like:
"Customer Name"
or
"Product Cost Price"
and produce a result where all upper case letters are made lower case and all spaces replaced by under-scores. Like this:
"Customer Name" would become "customer_name", and
"Product Cost Price" would become "product_cost_price"
Many thanks for any swift help,
S
I would normally research this myself, but I am in a hurry just now.
My question is - how would I take a string like:
"Customer Name"
or
"Product Cost Price"
and produce a result where all upper case letters are made lower case and all spaces replaced by under-scores. Like this:
"Customer Name" would become "customer_name", and
"Product Cost Price" would become "product_cost_price"
Many thanks for any swift help,
S