Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. Regular Expressions
  4. Use content of a database field in RegEx

Use content of a database field in RegEx

Scheduled Pinned Locked Moved Regular Expressions
databasesalesregexquestionannouncement
1 Posts 1 Posters 4 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • J Offline
    J Offline
    John Bradford 2022
    wrote on last edited by
    #1

    I want to be able to use the content of a database table as part of a regex expression. This isn't the actual use case, but it shows what I want to do. Database table includes a field with customer names, "Acme","Starbucks","Delta". This table gets updated with new customers daily. I have a simple RegEx that looks for the existence of some text in an OCR'd document. (?i)(Acme|Starbucks|Delta) I want to update the RegEx statement with the new entries. I know I can do it through some external scripting, but what I would like to do is embed some sort of call to the table and column a the time of execution, like "(?i)(ODBC Hook to the data here)"

    1 Reply Last reply
    0
    Reply
    • Reply as topic
    Log in to reply
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes


    • Login

    • Don't have an account? Register

    • Login or register to search.
    • First post
      Last post
    0
    • Categories
    • Recent
    • Tags
    • Popular
    • World
    • Users
    • Groups