I tried to pull out a signed /or unsgined number from string using regexp in perl.
$str = "This string has a number +15 init "; regex : m/.*([\+|-](\d+)).*$/ #which works well for above said +string
but consider this case
$str = "This string has a number15 init"; #i need to fix the above regex to work for avove string as well
In reply to pull out num from str by icoder
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |