jrhabana
asked on
regex replace up to char or end of line
Hello, i had this strings
http://domain.com/?param1=value1¶m2=value2
http://domain.com/?param1=value1¶m2=value2¶m3=value3
I want replace, param2=xxxx with param2=bbbb
but i'm having problems to detect the end to group to replace, due can be & or end of line
I tryed this mystring.replace(/¶m2= (.*)(?=&|$ )/gi,'&par am2=newval ue' ) but don't work
Thanks
http://domain.com/?param1=value1¶m2=value2
http://domain.com/?param1=value1¶m2=value2¶m3=value3
I want replace, param2=xxxx with param2=bbbb
but i'm having problems to detect the end to group to replace, due can be & or end of line
I tryed this mystring.replace(/¶m2=
Thanks
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.