Re: RegEx with phix - howto
- Posted by _tom (admin) Jul 03, 2018
- 1444 views
First rule of regex: do not use regex.
Try something simple first.
include std/search.e sequence line = "lorum ipsum lorum ipusm 10.1016.12.31/nature.S0735%20-1097(98)2000/12/31/34:7-7 lorum ipsum." integer n, m n = match( "10.", line ) ? n if n then m = find_any( " \t\r\n", line, n ) ? m if m then puts(1, line[n..m] ) end if end if --> a `DOI` number
_tom