The regex above will capture text close to (but not exactly like) a "$gettok($1-,1,45)":
- it will match the first "-"char in $1- (found a match, return "1", the if-statement is true now)
- and it will capture all the text before that matching char if there is text preceding the char (you can refer to this text via $regml(1). the if-statement will be true if no text preceds the "-"char though).

As I assume a combination of token identifiers and/or other text identifiers like $pos may be sufficient, please provide an example on how you want to find/match - I'm not sure what you want to find:
- the position of a specific char in the string of text?
- the start and end position of some text?
- a relative position of some text?
- the text itself?

smile