I have this resumed animation data list with the most representative formats:
* » iddle 1-210
* » run01 215-252
* » stand up 876-987
0 - = bindpose
1 - 48 = idle
118 - 150 = attack_idle
151 - 192 = attack 1
791 - 815 = strafe right
000 - 009 T-pose
010 - 040 walk
045 - 075 walk-back
080 - 110 walk-right-45
490 - 590 idle-1
1060 - 1120 spell-cast_01
1515 - 1590 sack_pick_up
I’m figuring how to match animation names…
I’ve made this match pattern,
([a-zA-Z][\w- _]+)
It returns
1: iddle 1-210
1: run01 215-252
1: stand up 876-987
1: bindpose
1: idle
1: attack_idle
1: attack 1
1: strafe right
1: T-pose
1: walk
1: walk-back
1: walk-right-45
1: idle-1
1: spell-cast_01
1: sack_pick_up
To avoid that the three starting matches contain numbers, I have tried this:
([a-zA-Z][\w- _]+)(?:\s\d+\s*[-]*\s*\d\s*)
but it does not match the last line:
1: iddle
1: run01
1: stand up
1: bindpose
1: idle
1: attack_idle
1: attack 1
1: strafe right
1: T-pose
1: walk
1: walk-back
1: walk-right-45
1: idle-1
1: spell-cast_01
Why?
I think is related to (?=\s but I have not found how to fix it…
EDIT: Fixed the ‘|’ between brackets
Use this regex to capture only names in
group1Use
multilinemodeErrors in your regex
the
_in[\w- _]is not needed since\wcontains_the
\w-in[\w- _]is wrong since you are specifying a range between\wand space.It should be
[\w -]since-when used at start or end of the character class doesnt have any special meaning