geometry - RegEx Pattern for Exactly Three Spaces and Comma Delimited Doubles -



geometry - RegEx Pattern for Exactly Three Spaces and Comma Delimited Doubles -

this odd request, can't seem find examples helping me out. need regex pattern matches following:

(0.0 0.0,1.0 1.0,2.0 0.0,0.0 0.0)

it's triangle on geometric plane each point be:

0.0 0.0 1.0 1.0 2.0 0.0 0.0 0.0

the 4th point beingness original starting point. need regex patter parenthesis, integers, dots, commas , 3 spaces.

use long pattern

\((\d*(?:\.\d+)?\s\d*(?:\.\d+)?),(?!\1)(\d*(?:\.\d+)?\s\d*(?:\.\d+)?),(?!\1)(?!\2)(\d*(?:\.\d+)?\s\d*(?:\.\d+)?),(\1)

demo

regex geometry

Comments

Popular posts from this blog

formatting - SAS SQL Datepart function returning odd values -

c++ - Apple Mach-O Linker Error(Duplicate Symbols For Architecture armv7) -

php - Yii 2: Unable to find a class into the extension 'yii2-admin' -