Substitution issue when ASP content is output

Updated on technology 2024-04-08
14 answers
  1. Anonymous users2024-02-07

    FYI.

    Send the source file of the output page and the content you want to find to be added to the mailbox, and send it directly to you.

    This can be done in addition to regular and js objects.

    text_str=cstr(text_str) 'Format as a string without losing your typography.

    The location to find.

    text_wz=10 'It is assumed to be the 10th here.

    text_wz1=text_wz-1 'This is used to find the subscript position of the array.

    What to add.

    text_add="ddd

    Exploding the item returns an array, so that the resulting array is delimited.

    text_arr=split(text_str,""Initialize the changed data.

    text_new=""

    Cycle through the combination of data and insert.

    for i=lbound(text_arr) to ubound(text_arr)

    if text_wz1=i then 'If the location is met.

    Restore the label and the original content and insert a new one.

    If the other location does not match, the original data can be restored.

    end if

    text_new

    If you have a lot of data like this, you can write a process that is easy to call in other places.

  2. Anonymous users2024-02-06

    There are several ideas for this effect.

    General direction. 1. Find the search keyword when submitting, and then replace it into the corresponding html format, CSS or something.

    2. Find the keyword when outputting and then respond to the corresponding html format.

    Method 1: The request is fast but space-consuming, and it is not conducive to future maintenance, and vice versa.

    Then it's a matter of replacing this step to implement:

    Opinion uses a table-driven approach to design the program.

    For example, upstairs define a config to find keywords and special characters, etc., and set the corresponding highlight format.

    I put forward an idea, use regular formula to detect, but this algorithm and positive rule should not be very easy to implement, there are a lot of ready-made HTML matching nets, keywords, to consider quotation marks, gaze, etc., if this algorithm is well designed the program will be very flexible!

    I'm just going to show you the right direction and look into it for yourself!

    Good luck, and if the development is successful, you can consider sharing it, right?

  3. Anonymous users2024-02-05

    You take a good look at the replace function then you understand everything, you can go to baidu to find a specific usage of this function, but don't use him to deal with too much of the string, it will be very slow, more than 10,000 words should be no problem.

  4. Anonymous users2024-02-04

    It's too much, can you see it yourself?

  5. Anonymous users2024-02-03

    <%dim arydata

    arydata = array("Zhang San: 123", "Lee IV: 456", "Wang Wu:

    789", "Zhao Liu: 147", "Che Seven: 258", "Ge Ba:

    369", "Huang Jiu: 159", "Li X: 753")

    dim d,i,t

    set d = "")

    for i = 0 to ubound(arydata)t = split(arydata(i),":")t(0),t(1)

    nextdim strul, strli

    strul = ""

    strli = ": "

    dim htm,li

    for each k in d

    li = replace(strli,"",k)li = replace(li,"",d(k))htm = htm & li

    nexthtm = replace(strul,"",htm)%>

  6. Anonymous users2024-02-02

    Who gave you the program above? It's stupid.

    Like this one. nr_img=replace(replace(replace(replace(replace(replace(replace(replace(replace(nr("nr"),img",img"),img", img"), talk about IMG", img"),img", img"),img", img"),img", img"),img",img"),img", img"Luming), IMG", img"Just replace it with a regular expression.

    Also, your question can also be directly replaced with a regular expression.

    I want to appear inside"Stone netting"When the page is displayed, the content is displayed as a demolition notice"

    Stone netting**Not all I don't know"Stone netting"These three words are **, how can I change them for you.

  7. Anonymous users2024-02-01

    It's super easy to do it yourself, but how can you say it's super simple?

  8. Anonymous users2024-01-31

    I don't study again, just copying **.

  9. Anonymous users2024-01-30

    Fix your character encoding first, when it comes to using GB-2312, sometimes other software doesn't use this, and it will directly appear garbled.

  10. Anonymous users2024-01-29

    Here's a hint for you.

    Specifically** you modify it yourself.

  11. Anonymous users2024-01-28

    <%name="Let's go beat soy sauce"

    actor="We go to school tomorrow and every day after tomorrow, and we don't go to work every day, we just go to soy sauce and fight. "

    cc=""for i=1 to len(name)

    c=mid(name,i,1)

    if instr(cc,c)=0 thencc=cc&c

    end if

    nextactor=replace(actor,","")

    actor=replace(actor,"","")actor=replace(actor,"","")actor

  12. Anonymous users2024-01-27

    <%name="Let's go beat soy sauce"

    actor="We go to school tomorrow and every day after tomorrow, and we don't go to work every day, we just go to soy sauce and fight. "

    cc=""for i=1 to len(name)

    c=mid(name,i,1)

    if instr(cc,c)=0 thencc=cc&c

    end if

    nextactor=replace(actor,","")

    actor=replace(actor,"","")actor=replace(actor,"","")actor

  13. Anonymous users2024-01-26

    I don't think it's advisable to replace with a normal one, which can take a lot of statements, and your text is indefinite.

    I suggest you look at the regular, and you should be able to distinguish between words with regulars that will achieve the effect you want.

  14. Anonymous users2024-01-25

    I guess you need to do that with the help of split and ubound functions.

Related questions
13 answers2024-04-08

I'm going to write about it roughly.

string strcontent = ; >>>More

11 answers2024-04-08

dim startime,conn,connstr,db,rs,rs_s,rs_s1

startime=timer() >>>More

14 answers2024-04-08

Landlord Your fault should be here:

now()&"'If you have a SQL database, use gedate(). >>>More

22 answers2024-04-08

Copy the text into word.。。 Keep it well.

Replacement. The dialog box that appears: >>>More

13 answers2024-04-08

Make a method in the submit button that either it won't be submitted to the database. >>>More