Skip to main content

Regular Expression - Omit Character

Comments

2 comments

  • Berend Veldkamp
    You could use the substring function to strip of that last 'O': SUBSTRING(FRSTDIVID, 1, 19) LIKE 'LA[0-9][0-9]0010S0080W0SN09'

     

     
    0
  • Permanently deleted user
    yeah not sure if this is a bug against ArcGIS Server REST API on WHERE clause so I just did the classic "OR" statement. Life must go on but I feel like a half awesome person half idiot now with REGEX after trying everything under the sun.

     

    Word of advice to someone trying REGEX in the future. Speed up your testing via the REST API: https://...../arcgis/rest/services/folder/mapserivce/MapServer/104/query <--I was sleepy and silly doing it the hard way by changing the REGEX testing in the Workflow itself...eye roll at myself.

     

    "FRSTDIVID LIKE " + "'" + argState.ToString() + "[0-9][0-9]" + argTwn.ToString() + "0" + argNS.ToString() + argRng.ToString() + "0" + argEW.ToString() + "0" + "[SUP][NPBA]" + argSec.ToString() + "' OR FRSTDIVID LIKE " + "'" + argState.ToString() + "[0-9][0-9]" + argTwn.ToString() + "0" + argNS.ToString() + argRng.ToString() + "0" + argEW.ToString() + "0" + "[SUP][NPBA]" + argSec.ToString() + "0'"
    0

Please sign in to leave a comment.