How to write regex to handle multiple spaces? -


i need regex name of label. labels this:

lbl labelname 

the regex need return labelname. manged make this:

(?<=\slbl\s).+?(?=\s) 

this works fine long there 1 character between "lbl" , "labelname". if add 2 spaces or more spaces return spaces.

i tried (?<=\slbl\s+).+?(?=\s) doesn't work either.

does following regular expression work you?

lbl\s+([^\s]+) 

Comments

Popular posts from this blog

javascript - Iterate over array and calculate average values of array-parts -

iphone - Using nested NSDictionary with Picker -

objective c - Newbie question -multiple parameters -