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
Post a Comment