I'm trying to find integer values in a script that represent screen coordinates. The search is simple in a single coordinate check. However, sometimes the search might be a single coordinate (X,Y) sometimes it might be checking for 2 coordinates, sometimes, 3 or 4. The problem is that the particular coordinates that I need find in a multiple coordinate scenario might be in any of the positions. As an example, a 4 coordinate search will have 4 positions with my coordinates being found in any of the 4 positions like this: where "$" represents the wildcard
IFPIXELEXISTS XPOS="XX,$,$,$" YPOS="YY,$,$,$"
IFPIXELEXISTS XPOS="$,XX,$,$" YPOS="$,YY,$,$"
IFPIXELEXISTS XPOS="$,$,XX,$" YPOS="$,$,YY,$"
IFPIXELEXISTS XPOS="$,$,$,XX" YPOS="$,$,$,YY"
I'm a novice with Regex and can't find a way to build the pattern search and the related replace string.
Aucun commentaire:
Enregistrer un commentaire