How to avoid the lexical error when input data to derby? -


i have regular patterns values saved in derby. includes lot of delimited letter mentioned in derby. how input data derby?

insert configuration_master (property_id,property_key, property_value, property_name , property_description , property_validation  ,category_1,category_2,category_3,fst_reg_dt,fnl_amd_dt ) values( 'agent.dependency.urlpatterns','agent.dependency.urlpatterns',"         \(\s*['"]#target['"]\s*\)\.attr\(\s*['"]action['"]\s*,['"]([\w]+\.do)['"]\)         \.attr\(\s*['"]action['"]\s*\,\s*['"]([\w_/\?\=\&]+)['"]\s*\)         a.href\s*\=\s*['"]([\w_/\?\=\&]+)['"]         [\. ]action\s*\=\s*['"]([\w_/\?\=\&]+)['"]         ['"]((/[\w\._]+)*/[\w\._]+\.do)['"]         ['"]\s*\.html['"]         (action|value|href)\s*=\s*['"]((\/[a-za-z0-9\$\{\}?=.]+){2,3})\/?['"]         ",'agent.dependency.urlpatterns','','','default','default','default','','') 

i'm not going through hideous regexp of yours , fix all, if want insert database, then:

  • use single quotes (') surround entire regexp string. @ moment using double quotes (").
  • use 2 single quotes inside string represent single-quote character within string. example

     select 'don't this' some_table 

    will fail error, but

     select 'it''s better this' some_table 

    will select string it's better this.


Comments

Popular posts from this blog

Magento/PHP - Get phones on all members in a customer group -

php - Bypass Geo Redirect for specific directories -

php - .htaccess mod_rewrite for dynamic url which has domain names -