How can you find the length of a regexp match...?

wxdqz

New Member
Hi everyone,

This is a (hopefully) pretty self-explanatory question: if you're searching for a regexp match where the number of characters in the actual match may vary (ie, where you're using regexp features like +, *, or ?), how can you find out what the length of an actual match is, without re-parsing the regexp by hand?

For example, if I'm searching for:-

"Nick +Pelling"

...and want to retain the spacing of the original string, regardless of how many spaces there are there, how do I find out the length of any given match?

Thanks, ....Nick Pelling....
 
Back
Top