Jump to content

Using RegEx in VBScript


Recommended Posts

Hi folks,I would be grateful if someone could help me out here. I am working on a script to extract some info from text files and I wish to extract digits preceding the keyword as part of the match. The key word will always be the same but the number of digits will vary - there could be between 1 and 6 digits. For example - the keyword would be "folio" and could be preceded by a group of numbers in no particular order such as 3, 52, 712, 3834, 42195 or 863518. I want to extract the word "folio" and whatever numbers precede it. I seem to recall doing this before in VBScript with RegEx using \d+ and (?<= but I can't find that script or work out what the RegEx expression should be. For this I would prefer to use RegEx rather than InstrAll I want is the expression but any tips would be welcome and appreciatedTIA

Link to comment
Share on other sites


This topic is now archived and is closed to further replies.

  • Create New...