Select the next line after match regex

后端 未结 2 635
我在风中等你
我在风中等你 2020-12-11 06:39

I\'m currently using a scanning software \"Drivve Image\" to extract certain information from each paper. This software enables certain Regex code to be run if needed. It se

2条回答
  •  鱼传尺愫
    2020-12-11 07:00

    Did some googling and from what I can grasp, the last parameter to the REGEXP.MATCH is the capture group to use. That means that you could use you own regex, without the \K, and just add a capture group to the number you want to extract.

     \bOrdernr\s+(\S+)
    

    This means that the number ends up in capture group 1 (the whole match is in 0 which I assume you've used).

    The documentation isn't crystal clear, but I guess the syntax is

    REGEXP.MATCH(, "REGEX", CaptureGroup)
    

    meaning you should use

    REGEXP.MATCH(, "\bOrdernr\s+(\S+)", 1)
    

    There's a fair amount of guessing here though... ;)

提交回复
热议问题