javascript
str 'a=5 b=4 c=9';
i want a regex that display 4 regarding b without matching b
<!DOCTYPE html>
<html>
<head>
<style type="text/css">
u{
color:red;
font-waight:bold;
}
</style>
</head>
<body>
<script type="text/javascript"><!--
var str='a=1 b=2 c=3';
var reg=/(b=)\d/g;
document.write('<u>' + str.match(reg) + '</u>');
</script>
</body>
</html>
cssCoder:
what you are saying is perfectly right but what i want actually is
if i am a regex
then i am somehow told to look for the number that comes after b= and i am not asked to pick up 'b='
str 'a=5 b=4 c=9';
i want a regex that display 4 regarding b without matching b
<!DOCTYPE html>
<html>
<head>
<style type="text/css">
u{
color:red;
font-waight:bold;
}
</style>
</head>
<body>
<script type="text/javascript"><!--
var str='a=1 b=2 c=3';
var reg=/(b=)\d/g;
document.write('<u>' + str.match(reg) + '</u>');
</script>
</body>
</html>
cssCoder:
what you are saying is perfectly right but what i want actually is
if i am a regex
then i am somehow told to look for the number that comes after b= and i am not asked to pick up 'b='