Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Strings
#2
Use regular expression. If it depends on i, create it with str function format.

Code:
Copy      Help
str s="1. e4 {0s} e5 {Biblio. 0s} 2. d3 {1s (Cf3)} Nc6 {Biblio. 0s} 3. g3 {4s} Nf6 {+0.27/7 2s} *"
int i=3
str rx.format("\b%i\. (\w+) \{.+?\} (\w+)" i)
ARRAY(str) a
if(findrx(s rx 0 0 a)<0) end "not found"
out a[1]
out a[2]


Messages In This Thread

Forum Jump:


Users browsing this thread: 1 Guest(s)