title: How to extract integer from string in Linux kernel space?
body: <p>I want to extract integers from string, e.g. I want to extract 0 as group identifier and 1 as mdev identifier from string "/dev/nkdev/group0/mdev1".</p>
  
  <p>In the above string "/dev/nkdev/group" is a fixed pattern in input, group id may be any integer between 0-9 and "mdev" is also not fixed, it may be any character sequence followed by an integer.</p>
  
  <p>I used following code</p>
  
  <pre><code>#define NO_INTEGER "%0[^0-9]"
  
  res = sscanf(dev_name_p, NO_INTEGER "%u" NO_INTEGER "%u",
               &amp;group_id, &amp;mdev_id);
  </code></pre>
  
  <p>But I found skip sequence is not supported in kernel. Can any body tell, if there is any kernel library function to do the job? </p>