Can anyone tell me what this kind of Regular Expression is doing?
(\s*(\s*#\s*(?\d+)\s*))
If I test it an add whitespaces it says there is no match.
Can somebody give me an example? :)
Can anyone tell me what this kind of Regular Expression is doing?
(\s*(\s*#\s*(?\d+)\s*))
If I test it an add whitespaces it says there is no match.
Can somebody give me an example? :)
That regular expression is not correct. Try removing the ? character.
(\s*(\s*#\s*(\d+)\s*))
And this expression matches any number that has an # in front of it. For example, in the next lines, it matches lines 1,2,5 and 6.
#995
#995
995
995
#995 9
#654 233
233
You can test it in the following link: http://regexstorm.net/tester?p=%28%5cs*%28%5cs*%23%5cs*%28%5cd%2b%29%5cs*%29%29&i=++%23995%0d%0a%23995%0d%0a++995%0d%0a995%0d%0a%23995+9%0d%0a++%23654+233%0d%0a233